Commit 17ecd906 authored by Ville Syrjälä's avatar Ville Syrjälä

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ä's avatarVille Syrjälä <ville.syrjala@linux.intel.com>
parent 24a06fef
......@@ -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/");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment