summaryrefslogtreecommitdiff
path: root/extras/scsi_id
diff options
context:
space:
mode:
Diffstat (limited to 'extras/scsi_id')
-rw-r--r--extras/scsi_id/scsi_id.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/extras/scsi_id/scsi_id.c b/extras/scsi_id/scsi_id.c
index a46d1b377d..a86b004709 100644
--- a/extras/scsi_id/scsi_id.c
+++ b/extras/scsi_id/scsi_id.c
@@ -107,7 +107,7 @@ static void set_str(char *to, const char *from, size_t count)
/* strip trailing whitespace */
len = strnlen(from, count);
- while (isspace(from[len-1]))
+ while (len && isspace(from[len-1]))
len--;
/* strip leading whitespace */