summaryrefslogtreecommitdiff
path: root/hw
diff options
context:
space:
mode:
authorPeter Hutterer <peter.hutterer@who-t.net>2017-05-05 09:04:35 +1000
committerAdam Jackson <ajax@redhat.com>2017-09-25 15:56:22 -0400
commit126144c2355ce5a3a350f15ef97389c7f34bb6fb (patch)
tree5a0df2be16a7e389af10206947e979342cee1050 /hw
parenta114286c079c42067b001ac330501496e2e297a1 (diff)
xfree86: up the path name size to 512 in xf86MatchDriverFromFiles
./hw/xfree86/common/xf86pciBus.c: In function ‘xf86MatchDriverFromFiles’: ../hw/xfree86/common/xf86pciBus.c:1330:52: warning: ‘snprintf’ output may be truncated before the last format character [-Wformat-truncation=] snprintf(path_name, sizeof(path_name), "%s/%s", ^~~~~~~ ../hw/xfree86/common/xf86pciBus.c:1330:13: note: ‘snprintf’ output between 2 dirent->d_name is 256, so sprintf("%s/%s") into a 256 buffer gives us: and 257 bytes into a destination of size 256 Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> (cherry picked from commit 96af794dc648eadcd596893412d7530e92cb5421)
Diffstat (limited to 'hw')
-rw-r--r--hw/xfree86/common/xf86pciBus.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/hw/xfree86/common/xf86pciBus.c b/hw/xfree86/common/xf86pciBus.c
index 8158c2b62..e61ae0cd4 100644
--- a/hw/xfree86/common/xf86pciBus.c
+++ b/hw/xfree86/common/xf86pciBus.c
@@ -1303,7 +1303,7 @@ xf86MatchDriverFromFiles(uint16_t match_vendor, uint16_t match_chip,
char *line = NULL;
size_t len;
ssize_t read;
- char path_name[256], vendor_str[5], chip_str[5];
+ char path_name[512], vendor_str[5], chip_str[5];
uint16_t vendor, chip;
int i = 0, j;