View | Details | Raw Unified | Return to bug 22186
Collapse All | Expand All

(-)scsi/scsi_cd.c (-13 / +5 lines)
Lines 3026-3033 Link Here
3026
	}
3026
	}
3027
3027
3028
	if (length != 0) {
3028
	if (length != 0) {
3029
		databuf = malloc(length, M_DEVBUF, M_WAITOK);
3029
		databuf = malloc(length, M_DEVBUF, M_WAITOK | M_ZERO);
3030
		bzero(databuf, length);
3031
	} else
3030
	} else
3032
		databuf = NULL;
3031
		databuf = NULL;
3033
3032
Lines 3158-3169 Link Here
3158
3157
3159
		length = sizeof(*challenge_data);
3158
		length = sizeof(*challenge_data);
3160
3159
3161
		challenge_data = malloc(length, M_DEVBUF, M_WAITOK);
3160
		challenge_data = malloc(length, M_DEVBUF, M_WAITOK | M_ZERO);
3162
3161
3163
		databuf = (u_int8_t *)challenge_data;
3162
		databuf = (u_int8_t *)challenge_data;
3164
3163
3165
		bzero(databuf, length);
3166
3167
		scsi_ulto2b(length - sizeof(challenge_data->data_len),
3164
		scsi_ulto2b(length - sizeof(challenge_data->data_len),
3168
			    challenge_data->data_len);
3165
			    challenge_data->data_len);
3169
3166
Lines 3177-3188 Link Here
3177
3174
3178
		length = sizeof(*key2_data);
3175
		length = sizeof(*key2_data);
3179
3176
3180
		key2_data = malloc(length, M_DEVBUF, M_WAITOK);
3177
		key2_data = malloc(length, M_DEVBUF, M_WAITOK | M_ZERO);
3181
3178
3182
		databuf = (u_int8_t *)key2_data;
3179
		databuf = (u_int8_t *)key2_data;
3183
3180
3184
		bzero(databuf, length);
3185
3186
		scsi_ulto2b(length - sizeof(key2_data->data_len),
3181
		scsi_ulto2b(length - sizeof(key2_data->data_len),
3187
			    key2_data->data_len);
3182
			    key2_data->data_len);
3188
3183
Lines 3196-3207 Link Here
3196
3191
3197
		length = sizeof(*rpc_data);
3192
		length = sizeof(*rpc_data);
3198
3193
3199
		rpc_data = malloc(length, M_DEVBUF, M_WAITOK);
3194
		rpc_data = malloc(length, M_DEVBUF, M_WAITOK | M_ZERO);
3200
3195
3201
		databuf = (u_int8_t *)rpc_data;
3196
		databuf = (u_int8_t *)rpc_data;
3202
3197
3203
		bzero(databuf, length);
3204
3205
		scsi_ulto2b(length - sizeof(rpc_data->data_len),
3198
		scsi_ulto2b(length - sizeof(rpc_data->data_len),
3206
			    rpc_data->data_len);
3199
			    rpc_data->data_len);
3207
3200
Lines 3343-3350 Link Here
3343
	}
3336
	}
3344
3337
3345
	if (length != 0) {
3338
	if (length != 0) {
3346
		databuf = malloc(length, M_DEVBUF, M_WAITOK);
3339
		databuf = malloc(length, M_DEVBUF, M_WAITOK | M_ZERO);
3347
		bzero(databuf, length);
3348
	} else
3340
	} else
3349
		databuf = NULL;
3341
		databuf = NULL;
3350
3342
(-)scsi/scsi_ch.c (-2 / +1 lines)
Lines 1192-1199 Link Here
1192
1192
1193
	user_data = (struct changer_element_status *)
1193
	user_data = (struct changer_element_status *)
1194
		malloc(avail * sizeof(struct changer_element_status),
1194
		malloc(avail * sizeof(struct changer_element_status),
1195
		       M_DEVBUF, M_WAITOK);
1195
		       M_DEVBUF, M_WAITOK | M_ZERO);
1196
	bzero(user_data, avail * sizeof(struct changer_element_status));
1197
1196
1198
	desc = (struct read_element_status_descriptor *)((uintptr_t)data +
1197
	desc = (struct read_element_status_descriptor *)((uintptr_t)data +
1199
		sizeof(struct read_element_status_header) +
1198
		sizeof(struct read_element_status_header) +
(-)scsi/scsi_sa.c (-4 / +2 lines)
Lines 2392-2399 Link Here
2392
			mode_buffer_len += sizeof (sa_comp_t);
2392
			mode_buffer_len += sizeof (sa_comp_t);
2393
	}
2393
	}
2394
2394
2395
	mode_buffer = malloc(mode_buffer_len, M_TEMP, M_WAITOK);
2395
	mode_buffer = malloc(mode_buffer_len, M_TEMP, M_WAITOK | M_ZERO);
2396
	bzero(mode_buffer, mode_buffer_len);
2397
	mode_hdr = (struct scsi_mode_header_6 *)mode_buffer;
2396
	mode_hdr = (struct scsi_mode_header_6 *)mode_buffer;
2398
	mode_blk = (struct scsi_mode_blk_desc *)&mode_hdr[1];
2397
	mode_blk = (struct scsi_mode_blk_desc *)&mode_hdr[1];
2399
2398
Lines 2595-2602 Link Here
2595
	if (params_to_set & SA_PARAM_COMPRESSION)
2594
	if (params_to_set & SA_PARAM_COMPRESSION)
2596
		mode_buffer_len += sizeof (sa_comp_t);
2595
		mode_buffer_len += sizeof (sa_comp_t);
2597
2596
2598
	mode_buffer = malloc(mode_buffer_len, M_TEMP, M_WAITOK);
2597
	mode_buffer = malloc(mode_buffer_len, M_TEMP, M_WAITOK | M_ZERO);
2599
	bzero(mode_buffer, mode_buffer_len);
2600
2598
2601
	mode_hdr = (struct scsi_mode_header_6 *)mode_buffer;
2599
	mode_hdr = (struct scsi_mode_header_6 *)mode_buffer;
2602
	mode_blk = (struct scsi_mode_blk_desc *)&mode_hdr[1];
2600
	mode_blk = (struct scsi_mode_blk_desc *)&mode_hdr[1];

Return to bug 22186