summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVille Syrjälä <ville.syrjala@linux.intel.com>2019-03-19 16:48:00 +0200
committerVille Syrjälä <ville.syrjala@linux.intel.com>2019-09-19 19:01:19 +0300
commit17ecd906f3b07c232d3a18fa3cc858b168123215 (patch)
tree71cb7a81ab72c5140098de0e996b06c904fae3cc
parent24a06fef712a98cfe2b409638307d5b349828f72 (diff)
downloadxorg-driver-xf86-video-intel-17ecd906f3b07c232d3a18fa3cc858b168123215.tar.gz
sna: Increase the size of the path name buffer a bit
../src/intel_device.c: In function ‘__intel_open_device__pci.isra.6’: ../src/intel_device.c:321:25: warning: ‘%s’ directive writing up to 255 bytes into a region of size 247 [-Wformat-overflow=] sprintf(path + base, "%s", de->d_name); Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
-rw-r--r--src/intel_device.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/intel_device.c b/src/intel_device.c
index 21955073..f28d3be1 100644
--- a/src/intel_device.c
+++ b/src/intel_device.c
@@ -301,9 +301,9 @@ static int open_cloexec(const char *path)
#ifdef __linux__
static int __intel_open_device__major_minor(int _major, int _minor)
{
- char path[256];
DIR *dir;
struct dirent *de;
+ char path[9+sizeof(de->d_name)];
int base, fd = -1;
base = sprintf(path, "/dev/dri/");