[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug-fdisk] cfdisk compilation failure
From: |
Colin Watson |
Subject: |
[bug-fdisk] cfdisk compilation failure |
Date: |
Tue, 6 Oct 2009 10:27:51 +0100 |
User-agent: |
Mutt/1.5.18 (2008-05-17) |
I'm not sure why this didn't fail for us before; perhaps a headers
change. At any rate, strnlen with one argument is clearly wrong - it
looks as though this was meant to be strlen.
diff -r 9737316be4a6 src/cfdisk.c
--- a/src/cfdisk.c Fri Jul 31 22:52:27 2009 +0200
+++ b/src/cfdisk.c Tue Oct 06 10:25:21 2009 +0100
@@ -2482,7 +2482,7 @@
}
snprintf(buf,SMALLBUF,"%lldB/%lldB\n",dev->sector_size,
dev->phys_sector_size);
- n = strnlen(buf);
+ n = strlen(buf);
context->info_sectorsize = calloc(n,sizeof(char));
strncpy(context->info_sectorsize,buf,n);
Thanks,
--
Colin Watson address@hidden
- [bug-fdisk] cfdisk compilation failure,
Colin Watson <=