sgpio/sgpio-1.2-coverity.patch

17 lines
404 B
Diff

Assume buffer overflow even if it's not possible.
Found by coverity.
Author: Jan Synacek <jsynacek@redhat.com>
--- sgpio/sgpio.c.orig 2012-11-30 14:14:09.000000000 +0100
+++ sgpio/sgpio.c 2012-11-30 14:14:17.437228466 +0100
@@ -629,7 +629,7 @@
return -1;
}
- strcpy(location, sys_scsi_path);
+ strncpy(location, sys_scsi_path, FS_PATH_LEN);
len = strlen(location);
for(i=0;i<dir_qan;i++){