Fix a couple of sizeof syntax errors in converting sprintf to snprintf. See bug #34125.

This commit is contained in:
rocky
2011-08-25 00:13:36 -04:00
parent 15cd458874
commit 22b544bde6

4
lib/driver/MSWindows/win32_ioctl.c Normal file → Executable file
View File

@@ -405,7 +405,7 @@ set_scsi_tuple_win32ioctl(_img_private_t *env)
&bytesReturned, &bytesReturned,
FALSE FALSE
)) { )) {
snprintf(tuple, sizeof(tuple) "%d,%d,%d,%d", snprintf(tuple, sizeof(tuple), "%d,%d,%d,%d",
scsiAddress->PortNumber, scsiAddress->PortNumber,
scsiAddress->PathId, scsiAddress->PathId,
scsiAddress->TargetId, scsiAddress->TargetId,
@@ -902,7 +902,7 @@ init_win32ioctl (_img_private_t *env)
} }
env->h_device_handle = hDevice; env->h_device_handle = hDevice;
#else #else
snprintf( psz_win32_drive, sizeof(psz_win32_drive, snprintf( psz_win32_drive, sizeof(psz_win32_drive),
"\\\\.\\%c:", "\\\\.\\%c:",
env->gen.source_name[len-2] ); env->gen.source_name[len-2] );