sprintf -> snprintf

This commit is contained in:
R. Bernstein
2011-10-19 21:12:14 -04:00
parent b4b810eaf9
commit 9eb137206c

View File

@@ -1631,7 +1631,7 @@ no_tuple:;
env->gen.scsi_tuple = strdup(""); env->gen.scsi_tuple = strdup("");
return 0; return 0;
} }
sprintf(tuple, "%d,%d,%d,%d,%d", snprintf(tuple, sizeof(tuple)-1, "%d,%d,%d,%d,%d",
bus_no, host_no, channel_no, target_no, lun_no); bus_no, host_no, channel_no, target_no, lun_no);
env->gen.scsi_tuple = strdup(tuple); env->gen.scsi_tuple = strdup(tuple);
return 1; return 1;