All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] Bug fixes for makedevs.c
@ 2019-10-28 17:14 Frazer Leslie Clews
  2019-10-28 17:14 ` [PATCH 1/2] fix format strings in makedevs.c in print statements Frazer Leslie Clews
                   ` (3 more replies)
  0 siblings, 4 replies; 6+ messages in thread
From: Frazer Leslie Clews @ 2019-10-28 17:14 UTC (permalink / raw)
  To: openembedded-core; +Cc: Frazer Leslie Clews

fixes a few bugs in some print statements and an overflow bug with usr_buf

Frazer Leslie Clews (2):
  fix format strings in makedevs.c in print statements
  fix invalidScanfFormatWidth to prevent overflowing usr_buf

 meta/recipes-devtools/makedevs/makedevs/makedevs.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

-- 
2.20.1



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

* [PATCH 1/2] fix format strings in makedevs.c in print statements
  2019-10-28 17:14 [PATCH 0/2] Bug fixes for makedevs.c Frazer Leslie Clews
@ 2019-10-28 17:14 ` Frazer Leslie Clews
  2019-10-28 17:14 ` [PATCH 2/2] fix invalidScanfFormatWidth to prevent overflowing usr_buf Frazer Leslie Clews
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 6+ messages in thread
From: Frazer Leslie Clews @ 2019-10-28 17:14 UTC (permalink / raw)
  To: openembedded-core; +Cc: Frazer Leslie Clews

Signed-off-by: Frazer Leslie Clews <frazer.clews@codethink.co.uk>
---
 meta/recipes-devtools/makedevs/makedevs/makedevs.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/meta/recipes-devtools/makedevs/makedevs/makedevs.c b/meta/recipes-devtools/makedevs/makedevs/makedevs.c
index cba7681414..01e564afee 100644
--- a/meta/recipes-devtools/makedevs/makedevs/makedevs.c
+++ b/meta/recipes-devtools/makedevs/makedevs/makedevs.c
@@ -230,7 +230,7 @@ static void add_new_directory(char *name, char *path,
 		unsigned long uid, unsigned long gid, unsigned long mode)
 {
 	if (trace)
-		fprintf(stderr, "Directory: %s %s  UID: %ld  GID %ld  MODE: %04lo", path, name, uid, gid, mode);
+		fprintf(stderr, "Directory: %s %s  UID: %lu  GID %lu  MODE: %04lo", path, name, uid, gid, mode);
 
 	if (mkdir(path, mode) < 0) {
 		if (EEXIST == errno) {
@@ -251,7 +251,7 @@ static void add_new_device(char *name, char *path, unsigned long uid,
 	struct stat sb;
 
 	if (trace) {
-		fprintf(stderr, "Device: %s %s  UID: %ld  GID: %ld  MODE: %04lo  MAJOR: %d  MINOR: %d",
+		fprintf(stderr, "Device: %s %s  UID: %lu  GID: %lu  MODE: %04lo  MAJOR: %d  MINOR: %d",
 				path, name, uid, gid, mode, (short)(rdev >> 8), (short)(rdev & 0xff));
 	}
 
@@ -292,7 +292,7 @@ static void add_new_file(char *name, char *path, unsigned long uid,
 				  unsigned long gid, unsigned long mode)
 {
 	if (trace) {
-		fprintf(stderr, "File: %s %s  UID: %ld  GID: %ld  MODE: %04lo\n",
+		fprintf(stderr, "File: %s %s  UID: %lu  GID: %lu  MODE: %04lo\n",
 			path, name, gid, uid, mode);
 	}
 
@@ -311,7 +311,7 @@ static void add_new_fifo(char *name, char *path, unsigned long uid,
 				  unsigned long gid, unsigned long mode)
 {
 	if (trace) {
-		printf("Fifo: %s %s  UID: %ld  GID: %ld  MODE: %04lo\n",
+		printf("Fifo: %s %s  UID: %lu  GID: %lu  MODE: %04lo\n",
 			path, name, gid, uid, mode);
 	}
 
-- 
2.20.1



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

* [PATCH 2/2] fix invalidScanfFormatWidth to prevent overflowing usr_buf
  2019-10-28 17:14 [PATCH 0/2] Bug fixes for makedevs.c Frazer Leslie Clews
  2019-10-28 17:14 ` [PATCH 1/2] fix format strings in makedevs.c in print statements Frazer Leslie Clews
@ 2019-10-28 17:14 ` Frazer Leslie Clews
  2019-10-28 17:32 ` ✗ patchtest: failure for Bug fixes for makedevs.c Patchwork
  2019-10-28 19:11 ` [PATCH 0/2] " Andre McCurdy
  3 siblings, 0 replies; 6+ messages in thread
From: Frazer Leslie Clews @ 2019-10-28 17:14 UTC (permalink / raw)
  To: openembedded-core; +Cc: Frazer Leslie Clews

Signed-off-by: Frazer Leslie Clews <frazer.clews@codethink.co.uk>
---
 meta/recipes-devtools/makedevs/makedevs/makedevs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/recipes-devtools/makedevs/makedevs/makedevs.c b/meta/recipes-devtools/makedevs/makedevs/makedevs.c
index 01e564afee..32b9872932 100644
--- a/meta/recipes-devtools/makedevs/makedevs/makedevs.c
+++ b/meta/recipes-devtools/makedevs/makedevs/makedevs.c
@@ -360,7 +360,7 @@ static int interpret_table_entry(char *line)
 	unsigned long mode = 0755, uid = 0, gid = 0, major = 0, minor = 0;
 	unsigned long start = 0, increment = 1, count = 0;
 
-	if (0 > sscanf(line, "%4095s %c %lo %40s %40s %lu %lu %lu %lu %lu", path,
+	if (0 > sscanf(line, "%4095s %c %lo %39s %39s %lu %lu %lu %lu %lu", path,
 		    &type, &mode, usr_buf, grp_buf, &major, &minor, &start,
 		    &increment, &count))
 	{
-- 
2.20.1



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

* ✗ patchtest: failure for Bug fixes for makedevs.c
  2019-10-28 17:14 [PATCH 0/2] Bug fixes for makedevs.c Frazer Leslie Clews
  2019-10-28 17:14 ` [PATCH 1/2] fix format strings in makedevs.c in print statements Frazer Leslie Clews
  2019-10-28 17:14 ` [PATCH 2/2] fix invalidScanfFormatWidth to prevent overflowing usr_buf Frazer Leslie Clews
@ 2019-10-28 17:32 ` Patchwork
  2019-10-28 19:11 ` [PATCH 0/2] " Andre McCurdy
  3 siblings, 0 replies; 6+ messages in thread
From: Patchwork @ 2019-10-28 17:32 UTC (permalink / raw)
  To: Frazer Leslie Clews; +Cc: openembedded-core

== Series Details ==

Series: Bug fixes for makedevs.c
Revision: 1
URL   : https://patchwork.openembedded.org/series/20722/
State : failure

== Summary ==


Thank you for submitting this patch series to OpenEmbedded Core. This is
an automated response. Several tests have been executed on the proposed
series by patchtest resulting in the following failures:



* Patch            [1/2] fix format strings in makedevs.c in print statements
 Issue             Shortlog does not follow expected format [test_shortlog_format] 
  Suggested fix    Commit shortlog (first line of commit message) should follow the format "<target>: <summary>"



If you believe any of these test results are incorrect, please reply to the
mailing list (openembedded-core@lists.openembedded.org) raising your concerns.
Otherwise we would appreciate you correcting the issues and submitting a new
version of the patchset if applicable. Please ensure you add/increment the
version number when sending the new version (i.e. [PATCH] -> [PATCH v2] ->
[PATCH v3] -> ...).

---
Guidelines:     https://www.openembedded.org/wiki/Commit_Patch_Message_Guidelines
Test framework: http://git.yoctoproject.org/cgit/cgit.cgi/patchtest
Test suite:     http://git.yoctoproject.org/cgit/cgit.cgi/patchtest-oe



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

* Re: [PATCH 0/2] Bug fixes for makedevs.c
  2019-10-28 17:14 [PATCH 0/2] Bug fixes for makedevs.c Frazer Leslie Clews
                   ` (2 preceding siblings ...)
  2019-10-28 17:32 ` ✗ patchtest: failure for Bug fixes for makedevs.c Patchwork
@ 2019-10-28 19:11 ` Andre McCurdy
  2019-10-28 21:22   ` Ross Burton
  3 siblings, 1 reply; 6+ messages in thread
From: Andre McCurdy @ 2019-10-28 19:11 UTC (permalink / raw)
  To: Frazer Leslie Clews; +Cc: OE Core mailing list

On Mon, Oct 28, 2019 at 10:15 AM Frazer Leslie Clews
<frazer.clews@codethink.co.uk> wrote:
>
> fixes a few bugs in some print statements and an overflow bug with usr_buf
>
> Frazer Leslie Clews (2):
>   fix format strings in makedevs.c in print statements
>   fix invalidScanfFormatWidth to prevent overflowing usr_buf

Perhaps fixing these issues would be a good opportunity to align with
the Buildroot (ie upstream?) version instead of diverging even more.

  https://git.buildroot.net/buildroot/tree/package/makedevs/makedevs.c

>  meta/recipes-devtools/makedevs/makedevs/makedevs.c | 10 +++++-----
>  1 file changed, 5 insertions(+), 5 deletions(-)
>
> --
> 2.20.1
>
> --
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core


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

* Re: [PATCH 0/2] Bug fixes for makedevs.c
  2019-10-28 19:11 ` [PATCH 0/2] " Andre McCurdy
@ 2019-10-28 21:22   ` Ross Burton
  0 siblings, 0 replies; 6+ messages in thread
From: Ross Burton @ 2019-10-28 21:22 UTC (permalink / raw)
  To: openembedded-core

On 28/10/2019 19:11, Andre McCurdy wrote:
> On Mon, Oct 28, 2019 at 10:15 AM Frazer Leslie Clews
> <frazer.clews@codethink.co.uk> wrote:
>>
>> fixes a few bugs in some print statements and an overflow bug with usr_buf
>>
>> Frazer Leslie Clews (2):
>>    fix format strings in makedevs.c in print statements
>>    fix invalidScanfFormatWidth to prevent overflowing usr_buf
> 
> Perhaps fixing these issues would be a good opportunity to align with
> the Buildroot (ie upstream?) version instead of diverging even more.
> 
>    https://git.buildroot.net/buildroot/tree/package/makedevs/makedevs.c

Yes, this.

If we can just fetch makedevs from buildroot that's one less piece of 
code we have to look after.

Ross


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

end of thread, other threads:[~2019-10-28 21:22 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-28 17:14 [PATCH 0/2] Bug fixes for makedevs.c Frazer Leslie Clews
2019-10-28 17:14 ` [PATCH 1/2] fix format strings in makedevs.c in print statements Frazer Leslie Clews
2019-10-28 17:14 ` [PATCH 2/2] fix invalidScanfFormatWidth to prevent overflowing usr_buf Frazer Leslie Clews
2019-10-28 17:32 ` ✗ patchtest: failure for Bug fixes for makedevs.c Patchwork
2019-10-28 19:11 ` [PATCH 0/2] " Andre McCurdy
2019-10-28 21:22   ` Ross Burton

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.