All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH i-g-t 1/3] Use PATH_MAX to fix some sprintf-into-short-buffers warnings.
@ 2017-09-03  4:38 Eric Anholt
  2017-09-03  4:38 ` [PATCH i-g-t 2/3] intel_watermark: Fix a warning about "const char" return being silly Eric Anholt
                   ` (4 more replies)
  0 siblings, 5 replies; 7+ messages in thread
From: Eric Anholt @ 2017-09-03  4:38 UTC (permalink / raw)
  To: intel-gfx

Signed-off-by: Eric Anholt <eric@anholt.net>
---

This little series cleans up many compiler warnings I saw when testing
danvet's meson branch.

 lib/igt_debugfs.c       | 4 ++--
 lib/igt_sysfs.c         | 4 ++--
 tests/kms_hdmi_inject.c | 2 +-
 tests/pm_rpm.c          | 4 ++--
 4 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/lib/igt_debugfs.c b/lib/igt_debugfs.c
index 090b56e03555..63183e57229b 100644
--- a/lib/igt_debugfs.c
+++ b/lib/igt_debugfs.c
@@ -491,7 +491,7 @@ static void igt_pipe_crc_reset(int drm_fd)
 	}
 
 	while ((dirent = readdir(dir))) {
-		char buf[128];
+		char buf[PATH_MAX];
 
 		if (strcmp(dirent->d_name, "crtc-") != 0)
 			continue;
@@ -525,7 +525,7 @@ static void igt_pipe_crc_reset(int drm_fd)
 static void pipe_crc_exit_handler(int sig)
 {
 	struct dirent *dirent;
-	char buf[128];
+	char buf[PATH_MAX];
 	DIR *dir;
 	int fd;
 
diff --git a/lib/igt_sysfs.c b/lib/igt_sysfs.c
index 15ed34be0088..9227e374bf44 100644
--- a/lib/igt_sysfs.c
+++ b/lib/igt_sysfs.c
@@ -192,7 +192,7 @@ int igt_sysfs_open_parameters(int device)
 	if (params < 0) { /* builtin? */
 		drm_version_t version;
 		char name[32] = "";
-		char path[128];
+		char path[PATH_MAX];
 
 		memset(&version, 0, sizeof(version));
 		version.name_len = sizeof(name);
@@ -499,7 +499,7 @@ void kick_fbcon(bool enable)
 		return;
 
 	while ((de = readdir(dir))) {
-		char buf[128];
+		char buf[PATH_MAX];
 		int fd, len;
 
 		if (strncmp(de->d_name, "vtcon", 5))
diff --git a/tests/kms_hdmi_inject.c b/tests/kms_hdmi_inject.c
index cb916acec3c1..22570a4b637a 100644
--- a/tests/kms_hdmi_inject.c
+++ b/tests/kms_hdmi_inject.c
@@ -170,7 +170,7 @@ eld_is_valid(void)
 			continue;
 
 		while ((snd_hda = readdir(dir))) {
-			char fpath[128];
+			char fpath[PATH_MAX];
 
 			if (*snd_hda->d_name == '.' ||
 			    strstr(snd_hda->d_name, "eld") == 0)
diff --git a/tests/pm_rpm.c b/tests/pm_rpm.c
index 47c9f1143484..9e8cf79b5128 100644
--- a/tests/pm_rpm.c
+++ b/tests/pm_rpm.c
@@ -594,14 +594,14 @@ static int count_i2c_valid_edids(void)
 	DIR *dir;
 
 	struct dirent *dirent;
-	char full_name[32];
+	char full_name[PATH_MAX];
 
 	dir = opendir("/dev/");
 	igt_assert(dir);
 
 	while ((dirent = readdir(dir))) {
 		if (strncmp(dirent->d_name, "i2c-", 4) == 0) {
-			snprintf(full_name, 32, "/dev/%s", dirent->d_name);
+			sprintf(full_name, "/dev/%s", dirent->d_name);
 			fd = open(full_name, O_RDWR);
 			igt_assert_neq(fd, -1);
 			if (i2c_edid_is_valid(fd))
-- 
2.14.1

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH i-g-t 2/3] intel_watermark: Fix a warning about "const char" return being silly.
  2017-09-03  4:38 [PATCH i-g-t 1/3] Use PATH_MAX to fix some sprintf-into-short-buffers warnings Eric Anholt
@ 2017-09-03  4:38 ` Eric Anholt
  2017-09-03  4:38 ` [PATCH i-g-t 3/3] intel_display_poller: Fix truncation of a test name Eric Anholt
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 7+ messages in thread
From: Eric Anholt @ 2017-09-03  4:38 UTC (permalink / raw)
  To: intel-gfx

Signed-off-by: Eric Anholt <eric@anholt.net>
---
 tools/intel_watermark.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/intel_watermark.c b/tools/intel_watermark.c
index d98ef19b0abd..d8c784802c5b 100644
--- a/tools/intel_watermark.c
+++ b/tools/intel_watermark.c
@@ -110,7 +110,7 @@ struct ilk_wm {
 	((((lo) >> (shift_lo)) & MASK(size_lo)) | \
 	 ((((hi) >> (shift_hi)) & MASK(size_hi)) << (size_lo)))
 
-static const char pipe_name(int pipe)
+static char pipe_name(int pipe)
 {
 	return 'A' + pipe;
 }
-- 
2.14.1

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH i-g-t 3/3] intel_display_poller: Fix truncation of a test name.
  2017-09-03  4:38 [PATCH i-g-t 1/3] Use PATH_MAX to fix some sprintf-into-short-buffers warnings Eric Anholt
  2017-09-03  4:38 ` [PATCH i-g-t 2/3] intel_watermark: Fix a warning about "const char" return being silly Eric Anholt
@ 2017-09-03  4:38 ` Eric Anholt
  2017-09-03  5:05 ` ✓ Fi.CI.BAT: success for series starting with [1/3] Use PATH_MAX to fix some sprintf-into-short-buffers warnings Patchwork
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 7+ messages in thread
From: Eric Anholt @ 2017-09-03  4:38 UTC (permalink / raw)
  To: intel-gfx

Signed-off-by: Eric Anholt <eric@anholt.net>
---
 tools/intel_display_poller.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/intel_display_poller.c b/tools/intel_display_poller.c
index c501c79d6367..828ca52b35ee 100644
--- a/tools/intel_display_poller.c
+++ b/tools/intel_display_poller.c
@@ -901,7 +901,7 @@ static void poll_dsl_field(int pipe, uint32_t *min, uint32_t *max, const int cou
 
 static const char *test_name(enum test test, int pipe, int bit, bool test_pixel_count)
 {
-	static char str[32];
+	static char str[64];
 	const char *type = test_pixel_count ? "pixel" : "dsl";
 
 	switch (test) {
-- 
2.14.1

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* ✓ Fi.CI.BAT: success for series starting with [1/3] Use PATH_MAX to fix some sprintf-into-short-buffers warnings.
  2017-09-03  4:38 [PATCH i-g-t 1/3] Use PATH_MAX to fix some sprintf-into-short-buffers warnings Eric Anholt
  2017-09-03  4:38 ` [PATCH i-g-t 2/3] intel_watermark: Fix a warning about "const char" return being silly Eric Anholt
  2017-09-03  4:38 ` [PATCH i-g-t 3/3] intel_display_poller: Fix truncation of a test name Eric Anholt
@ 2017-09-03  5:05 ` Patchwork
  2017-09-03  6:02 ` ✓ Fi.CI.IGT: " Patchwork
  2017-09-04  8:49 ` [PATCH i-g-t 1/3] " Daniel Vetter
  4 siblings, 0 replies; 7+ messages in thread
From: Patchwork @ 2017-09-03  5:05 UTC (permalink / raw)
  To: Eric Anholt; +Cc: intel-gfx

== Series Details ==

Series: series starting with [1/3] Use PATH_MAX to fix some sprintf-into-short-buffers warnings.
URL   : https://patchwork.freedesktop.org/series/29752/
State : success

== Summary ==

IGT patchset tested on top of latest successful build
5ce65a9a51f17e0183e3e4f8943981ee7b96cadd pm_rps: Changes in waitboost scenario

with latest DRM-Tip kernel build CI_DRM_3030
69c8e7a57ac9 drm-tip: 2017y-09m-02d-20h-25m-44s UTC integration manifest

Test kms_cursor_legacy:
        Subgroup basic-busy-flip-before-cursor-atomic:
                fail       -> PASS       (fi-snb-2600) fdo#100215
Test kms_flip:
        Subgroup basic-flip-vs-modeset:
                skip       -> PASS       (fi-skl-x1585l) fdo#101781

fdo#100215 https://bugs.freedesktop.org/show_bug.cgi?id=100215
fdo#101781 https://bugs.freedesktop.org/show_bug.cgi?id=101781

fi-bdw-5557u     total:288  pass:268  dwarn:0   dfail:0   fail:0   skip:20  time:457s
fi-blb-e6850     total:288  pass:224  dwarn:1   dfail:0   fail:0   skip:63  time:366s
fi-bsw-n3050     total:288  pass:243  dwarn:0   dfail:0   fail:0   skip:45  time:562s
fi-bwr-2160      total:288  pass:184  dwarn:0   dfail:0   fail:0   skip:104 time:252s
fi-bxt-j4205     total:288  pass:260  dwarn:0   dfail:0   fail:0   skip:28  time:521s
fi-byt-j1900     total:288  pass:254  dwarn:1   dfail:0   fail:0   skip:33  time:529s
fi-byt-n2820     total:288  pass:250  dwarn:1   dfail:0   fail:0   skip:37  time:516s
fi-elk-e7500     total:288  pass:230  dwarn:0   dfail:0   fail:0   skip:58  time:440s
fi-glk-2a        total:288  pass:260  dwarn:0   dfail:0   fail:0   skip:28  time:613s
fi-hsw-4770      total:288  pass:263  dwarn:0   dfail:0   fail:0   skip:25  time:448s
fi-hsw-4770r     total:288  pass:263  dwarn:0   dfail:0   fail:0   skip:25  time:429s
fi-ilk-650       total:288  pass:229  dwarn:0   dfail:0   fail:0   skip:59  time:422s
fi-ivb-3520m     total:288  pass:261  dwarn:0   dfail:0   fail:0   skip:27  time:510s
fi-ivb-3770      total:288  pass:261  dwarn:0   dfail:0   fail:0   skip:27  time:474s
fi-kbl-7500u     total:288  pass:264  dwarn:1   dfail:0   fail:0   skip:23  time:517s
fi-kbl-7560u     total:288  pass:269  dwarn:0   dfail:0   fail:0   skip:19  time:602s
fi-kbl-r         total:288  pass:261  dwarn:0   dfail:0   fail:0   skip:27  time:602s
fi-pnv-d510      total:288  pass:223  dwarn:1   dfail:0   fail:0   skip:64  time:525s
fi-skl-6260u     total:288  pass:269  dwarn:0   dfail:0   fail:0   skip:19  time:466s
fi-skl-6700k     total:288  pass:265  dwarn:0   dfail:0   fail:0   skip:23  time:534s
fi-skl-6770hq    total:288  pass:269  dwarn:0   dfail:0   fail:0   skip:19  time:491s
fi-skl-gvtdvm    total:288  pass:266  dwarn:0   dfail:0   fail:0   skip:22  time:445s
fi-skl-x1585l    total:288  pass:269  dwarn:0   dfail:0   fail:0   skip:19  time:505s
fi-snb-2520m     total:288  pass:251  dwarn:0   dfail:0   fail:0   skip:37  time:551s
fi-snb-2600      total:288  pass:250  dwarn:0   dfail:0   fail:0   skip:38  time:409s

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_140/
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 7+ messages in thread

* ✓ Fi.CI.IGT: success for series starting with [1/3] Use PATH_MAX to fix some sprintf-into-short-buffers warnings.
  2017-09-03  4:38 [PATCH i-g-t 1/3] Use PATH_MAX to fix some sprintf-into-short-buffers warnings Eric Anholt
                   ` (2 preceding siblings ...)
  2017-09-03  5:05 ` ✓ Fi.CI.BAT: success for series starting with [1/3] Use PATH_MAX to fix some sprintf-into-short-buffers warnings Patchwork
@ 2017-09-03  6:02 ` Patchwork
  2017-09-04  8:49 ` [PATCH i-g-t 1/3] " Daniel Vetter
  4 siblings, 0 replies; 7+ messages in thread
From: Patchwork @ 2017-09-03  6:02 UTC (permalink / raw)
  To: Eric Anholt; +Cc: intel-gfx

== Series Details ==

Series: series starting with [1/3] Use PATH_MAX to fix some sprintf-into-short-buffers warnings.
URL   : https://patchwork.freedesktop.org/series/29752/
State : success

== Summary ==

Test kms_atomic_transition:
        Subgroup plane-use-after-nonblocking-unbind-fencing:
                fail       -> INCOMPLETE (shard-hsw) fdo#101847
Test kms_flip:
        Subgroup flip-vs-absolute-wf_vblank:
                pass       -> FAIL       (shard-hsw) fdo#100368
Test perf:
        Subgroup blocking:
                pass       -> FAIL       (shard-hsw) fdo#102252
Test kms_sysfs_edid_timing:
                warn       -> PASS       (shard-hsw) fdo#100047

fdo#101847 https://bugs.freedesktop.org/show_bug.cgi?id=101847
fdo#100368 https://bugs.freedesktop.org/show_bug.cgi?id=100368
fdo#102252 https://bugs.freedesktop.org/show_bug.cgi?id=102252
fdo#100047 https://bugs.freedesktop.org/show_bug.cgi?id=100047

shard-hsw        total:2214 pass:1208 dwarn:0   dfail:0   fail:16  skip:988 time:9316s

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_140/shards.html
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH i-g-t 1/3] Use PATH_MAX to fix some sprintf-into-short-buffers warnings.
  2017-09-03  4:38 [PATCH i-g-t 1/3] Use PATH_MAX to fix some sprintf-into-short-buffers warnings Eric Anholt
                   ` (3 preceding siblings ...)
  2017-09-03  6:02 ` ✓ Fi.CI.IGT: " Patchwork
@ 2017-09-04  8:49 ` Daniel Vetter
  2017-09-05 11:44   ` Daniel Vetter
  4 siblings, 1 reply; 7+ messages in thread
From: Daniel Vetter @ 2017-09-04  8:49 UTC (permalink / raw)
  To: Eric Anholt; +Cc: intel-gfx

On Sat, Sep 02, 2017 at 09:38:51PM -0700, Eric Anholt wrote:
> Signed-off-by: Eric Anholt <eric@anholt.net>
> ---
> 
> This little series cleans up many compiler warnings I saw when testing
> danvet's meson branch.

On the series: Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>

I've pulled in your other meson patches, they need minimal polish (e.g. my
gcc doesn't have all the -W flags yours has, resulting in warnings about
unknown flags without first checking for them).
-Daniel
> 
>  lib/igt_debugfs.c       | 4 ++--
>  lib/igt_sysfs.c         | 4 ++--
>  tests/kms_hdmi_inject.c | 2 +-
>  tests/pm_rpm.c          | 4 ++--
>  4 files changed, 7 insertions(+), 7 deletions(-)
> 
> diff --git a/lib/igt_debugfs.c b/lib/igt_debugfs.c
> index 090b56e03555..63183e57229b 100644
> --- a/lib/igt_debugfs.c
> +++ b/lib/igt_debugfs.c
> @@ -491,7 +491,7 @@ static void igt_pipe_crc_reset(int drm_fd)
>  	}
>  
>  	while ((dirent = readdir(dir))) {
> -		char buf[128];
> +		char buf[PATH_MAX];
>  
>  		if (strcmp(dirent->d_name, "crtc-") != 0)
>  			continue;
> @@ -525,7 +525,7 @@ static void igt_pipe_crc_reset(int drm_fd)
>  static void pipe_crc_exit_handler(int sig)
>  {
>  	struct dirent *dirent;
> -	char buf[128];
> +	char buf[PATH_MAX];
>  	DIR *dir;
>  	int fd;
>  
> diff --git a/lib/igt_sysfs.c b/lib/igt_sysfs.c
> index 15ed34be0088..9227e374bf44 100644
> --- a/lib/igt_sysfs.c
> +++ b/lib/igt_sysfs.c
> @@ -192,7 +192,7 @@ int igt_sysfs_open_parameters(int device)
>  	if (params < 0) { /* builtin? */
>  		drm_version_t version;
>  		char name[32] = "";
> -		char path[128];
> +		char path[PATH_MAX];
>  
>  		memset(&version, 0, sizeof(version));
>  		version.name_len = sizeof(name);
> @@ -499,7 +499,7 @@ void kick_fbcon(bool enable)
>  		return;
>  
>  	while ((de = readdir(dir))) {
> -		char buf[128];
> +		char buf[PATH_MAX];
>  		int fd, len;
>  
>  		if (strncmp(de->d_name, "vtcon", 5))
> diff --git a/tests/kms_hdmi_inject.c b/tests/kms_hdmi_inject.c
> index cb916acec3c1..22570a4b637a 100644
> --- a/tests/kms_hdmi_inject.c
> +++ b/tests/kms_hdmi_inject.c
> @@ -170,7 +170,7 @@ eld_is_valid(void)
>  			continue;
>  
>  		while ((snd_hda = readdir(dir))) {
> -			char fpath[128];
> +			char fpath[PATH_MAX];
>  
>  			if (*snd_hda->d_name == '.' ||
>  			    strstr(snd_hda->d_name, "eld") == 0)
> diff --git a/tests/pm_rpm.c b/tests/pm_rpm.c
> index 47c9f1143484..9e8cf79b5128 100644
> --- a/tests/pm_rpm.c
> +++ b/tests/pm_rpm.c
> @@ -594,14 +594,14 @@ static int count_i2c_valid_edids(void)
>  	DIR *dir;
>  
>  	struct dirent *dirent;
> -	char full_name[32];
> +	char full_name[PATH_MAX];
>  
>  	dir = opendir("/dev/");
>  	igt_assert(dir);
>  
>  	while ((dirent = readdir(dir))) {
>  		if (strncmp(dirent->d_name, "i2c-", 4) == 0) {
> -			snprintf(full_name, 32, "/dev/%s", dirent->d_name);
> +			sprintf(full_name, "/dev/%s", dirent->d_name);
>  			fd = open(full_name, O_RDWR);
>  			igt_assert_neq(fd, -1);
>  			if (i2c_edid_is_valid(fd))
> -- 
> 2.14.1
> 
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx

-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH i-g-t 1/3] Use PATH_MAX to fix some sprintf-into-short-buffers warnings.
  2017-09-04  8:49 ` [PATCH i-g-t 1/3] " Daniel Vetter
@ 2017-09-05 11:44   ` Daniel Vetter
  0 siblings, 0 replies; 7+ messages in thread
From: Daniel Vetter @ 2017-09-05 11:44 UTC (permalink / raw)
  To: Eric Anholt; +Cc: intel-gfx

On Mon, Sep 04, 2017 at 10:49:46AM +0200, Daniel Vetter wrote:
> On Sat, Sep 02, 2017 at 09:38:51PM -0700, Eric Anholt wrote:
> > Signed-off-by: Eric Anholt <eric@anholt.net>
> > ---
> > 
> > This little series cleans up many compiler warnings I saw when testing
> > danvet's meson branch.
> 
> On the series: Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
> 
> I've pulled in your other meson patches, they need minimal polish (e.g. my
> gcc doesn't have all the -W flags yours has, resulting in warnings about
> unknown flags without first checking for them).

Seems like you're on vacations already, so pulled them all in.

Thanks, Daniel

> -Daniel
> > 
> >  lib/igt_debugfs.c       | 4 ++--
> >  lib/igt_sysfs.c         | 4 ++--
> >  tests/kms_hdmi_inject.c | 2 +-
> >  tests/pm_rpm.c          | 4 ++--
> >  4 files changed, 7 insertions(+), 7 deletions(-)
> > 
> > diff --git a/lib/igt_debugfs.c b/lib/igt_debugfs.c
> > index 090b56e03555..63183e57229b 100644
> > --- a/lib/igt_debugfs.c
> > +++ b/lib/igt_debugfs.c
> > @@ -491,7 +491,7 @@ static void igt_pipe_crc_reset(int drm_fd)
> >  	}
> >  
> >  	while ((dirent = readdir(dir))) {
> > -		char buf[128];
> > +		char buf[PATH_MAX];
> >  
> >  		if (strcmp(dirent->d_name, "crtc-") != 0)
> >  			continue;
> > @@ -525,7 +525,7 @@ static void igt_pipe_crc_reset(int drm_fd)
> >  static void pipe_crc_exit_handler(int sig)
> >  {
> >  	struct dirent *dirent;
> > -	char buf[128];
> > +	char buf[PATH_MAX];
> >  	DIR *dir;
> >  	int fd;
> >  
> > diff --git a/lib/igt_sysfs.c b/lib/igt_sysfs.c
> > index 15ed34be0088..9227e374bf44 100644
> > --- a/lib/igt_sysfs.c
> > +++ b/lib/igt_sysfs.c
> > @@ -192,7 +192,7 @@ int igt_sysfs_open_parameters(int device)
> >  	if (params < 0) { /* builtin? */
> >  		drm_version_t version;
> >  		char name[32] = "";
> > -		char path[128];
> > +		char path[PATH_MAX];
> >  
> >  		memset(&version, 0, sizeof(version));
> >  		version.name_len = sizeof(name);
> > @@ -499,7 +499,7 @@ void kick_fbcon(bool enable)
> >  		return;
> >  
> >  	while ((de = readdir(dir))) {
> > -		char buf[128];
> > +		char buf[PATH_MAX];
> >  		int fd, len;
> >  
> >  		if (strncmp(de->d_name, "vtcon", 5))
> > diff --git a/tests/kms_hdmi_inject.c b/tests/kms_hdmi_inject.c
> > index cb916acec3c1..22570a4b637a 100644
> > --- a/tests/kms_hdmi_inject.c
> > +++ b/tests/kms_hdmi_inject.c
> > @@ -170,7 +170,7 @@ eld_is_valid(void)
> >  			continue;
> >  
> >  		while ((snd_hda = readdir(dir))) {
> > -			char fpath[128];
> > +			char fpath[PATH_MAX];
> >  
> >  			if (*snd_hda->d_name == '.' ||
> >  			    strstr(snd_hda->d_name, "eld") == 0)
> > diff --git a/tests/pm_rpm.c b/tests/pm_rpm.c
> > index 47c9f1143484..9e8cf79b5128 100644
> > --- a/tests/pm_rpm.c
> > +++ b/tests/pm_rpm.c
> > @@ -594,14 +594,14 @@ static int count_i2c_valid_edids(void)
> >  	DIR *dir;
> >  
> >  	struct dirent *dirent;
> > -	char full_name[32];
> > +	char full_name[PATH_MAX];
> >  
> >  	dir = opendir("/dev/");
> >  	igt_assert(dir);
> >  
> >  	while ((dirent = readdir(dir))) {
> >  		if (strncmp(dirent->d_name, "i2c-", 4) == 0) {
> > -			snprintf(full_name, 32, "/dev/%s", dirent->d_name);
> > +			sprintf(full_name, "/dev/%s", dirent->d_name);
> >  			fd = open(full_name, O_RDWR);
> >  			igt_assert_neq(fd, -1);
> >  			if (i2c_edid_is_valid(fd))
> > -- 
> > 2.14.1
> > 
> > _______________________________________________
> > Intel-gfx mailing list
> > Intel-gfx@lists.freedesktop.org
> > https://lists.freedesktop.org/mailman/listinfo/intel-gfx
> 
> -- 
> Daniel Vetter
> Software Engineer, Intel Corporation
> http://blog.ffwll.ch

-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2017-09-05 11:44 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-09-03  4:38 [PATCH i-g-t 1/3] Use PATH_MAX to fix some sprintf-into-short-buffers warnings Eric Anholt
2017-09-03  4:38 ` [PATCH i-g-t 2/3] intel_watermark: Fix a warning about "const char" return being silly Eric Anholt
2017-09-03  4:38 ` [PATCH i-g-t 3/3] intel_display_poller: Fix truncation of a test name Eric Anholt
2017-09-03  5:05 ` ✓ Fi.CI.BAT: success for series starting with [1/3] Use PATH_MAX to fix some sprintf-into-short-buffers warnings Patchwork
2017-09-03  6:02 ` ✓ Fi.CI.IGT: " Patchwork
2017-09-04  8:49 ` [PATCH i-g-t 1/3] " Daniel Vetter
2017-09-05 11:44   ` Daniel Vetter

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.