* [PATCH] Fix NUL (\0 or \x00) specification in string
@ 2015-01-04 18:05 Giel van Schijndel
2015-01-04 23:04 ` Giel van Schijndel
` (2 more replies)
0 siblings, 3 replies; 8+ messages in thread
From: Giel van Schijndel @ 2015-01-04 18:05 UTC (permalink / raw)
To: linux-kernel
Cc: Giel van Schijndel, Armin Schindler, Karsten Keil,
open list:ISDN SUBSYSTEM
In C one can either use '\0' or '\x00' (or '\000') to add a NUL byte to
a string. '\0x00' isn't part of these and will in fact result in a
single NUL followed by "x00". This fixes that.
---
drivers/isdn/hardware/eicon/message.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/isdn/hardware/eicon/message.c b/drivers/isdn/hardware/eicon/message.c
index a82e542..0b38060 100644
--- a/drivers/isdn/hardware/eicon/message.c
+++ b/drivers/isdn/hardware/eicon/message.c
@@ -4880,7 +4880,7 @@ static void sig_ind(PLCI *plci)
byte SS_Ind[] = "\x05\x02\x00\x02\x00\x00"; /* Hold_Ind struct*/
byte CF_Ind[] = "\x09\x02\x00\x06\x00\x00\x00\x00\x00\x00";
byte Interr_Err_Ind[] = "\x0a\x02\x00\x07\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00";
- byte CONF_Ind[] = "\x09\x16\x00\x06\x00\x00\0x00\0x00\0x00\0x00";
+ byte CONF_Ind[] = "\x09\x16\x00\x06\x00\x00\x00\x00\x00\x00";
byte force_mt_info = false;
byte dir;
dword d;
--
2.1.4
^ permalink raw reply [flat|nested] 8+ messages in thread* Re: [PATCH] Fix NUL (\0 or \x00) specification in string 2015-01-04 18:05 [PATCH] Fix NUL (\0 or \x00) specification in string Giel van Schijndel @ 2015-01-04 23:04 ` Giel van Schijndel 2015-01-05 15:00 ` David Sterba 2015-01-07 19:10 ` [PATCH RESEND] isdn: fix " Giel van Schijndel 2 siblings, 0 replies; 8+ messages in thread From: Giel van Schijndel @ 2015-01-04 23:04 UTC (permalink / raw) To: linux-kernel; +Cc: Armin Schindler, Karsten Keil, open list:ISDN SUBSYSTEM [-- Attachment #1: Type: text/plain, Size: 522 bytes --] On Sun, Jan 04, 2015 at 19:05:22 +0100, Giel van Schijndel wrote: > In C one can either use '\0' or '\x00' (or '\000') to add a NUL byte to > a string. '\0x00' isn't part of these and will in fact result in a > single NUL followed by "x00". This fixes that. > --- Forgot to: Signed-off-by: Giel van Schijndel <me@mortis.eu> -- Met vriendelijke groet, With kind regards, Giel van Schijndel -- "There are 2 types of people in this world - those who like Chuck Norris and those who are dead." -- Jus12 [-- Attachment #2: Digital signature --] [-- Type: application/pgp-signature, Size: 181 bytes --] ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] Fix NUL (\0 or \x00) specification in string 2015-01-04 18:05 [PATCH] Fix NUL (\0 or \x00) specification in string Giel van Schijndel 2015-01-04 23:04 ` Giel van Schijndel @ 2015-01-05 15:00 ` David Sterba 2015-01-06 19:28 ` Giel van Schijndel 2015-01-07 19:10 ` [PATCH RESEND] isdn: fix " Giel van Schijndel 2 siblings, 1 reply; 8+ messages in thread From: David Sterba @ 2015-01-05 15:00 UTC (permalink / raw) To: Giel van Schijndel Cc: linux-kernel, Armin Schindler, Karsten Keil, open list:ISDN SUBSYSTEM I'm replying to all your recent patches here as they are fixing things reported in http://www.viva64.com/en/b/0299/ . I'ts a good practice to give the credit the reporter. The blogpost also contains analyses of the issues so it could help reviewing the patches. ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] Fix NUL (\0 or \x00) specification in string 2015-01-05 15:00 ` David Sterba @ 2015-01-06 19:28 ` Giel van Schijndel 2015-01-07 12:22 ` David Sterba 0 siblings, 1 reply; 8+ messages in thread From: Giel van Schijndel @ 2015-01-06 19:28 UTC (permalink / raw) To: dsterba, linux-kernel, Armin Schindler, Karsten Keil, open list:ISDN SUBSYSTEM [-- Attachment #1: Type: text/plain, Size: 912 bytes --] On Mon, Jan 05, 2015 at 16:00:26 +0100, David Sterba wrote: > I'm replying to all your recent patches here as they are fixing things > reported in http://www.viva64.com/en/b/0299/ . I'ts a good practice to > give the credit the reporter. > > The blogpost also contains analyses of the issues so it could help > reviewing the patches. I guess you suggest I use a 'Reported-(at|by)' line? Would something like the below suffice? I found similar log entries in the commit log, e.g. bf3204cb, except that those add an e-mail address for the reporters, which I don't think is necessary in this case. > Reported-at: http://www.viva64.com/en/b/0299/ > Reported-by: Andrey Karpov > Reported-by: Svyatoslav Razmyslov -- Met vriendelijke groet, With kind regards, Giel van Schijndel -- The #1 programmer excuse for legitimately slacking off: "My code's compiling." -- http://xkcd.com/303/ [-- Attachment #2: Digital signature --] [-- Type: application/pgp-signature, Size: 181 bytes --] ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] Fix NUL (\0 or \x00) specification in string 2015-01-06 19:28 ` Giel van Schijndel @ 2015-01-07 12:22 ` David Sterba 2015-01-07 18:45 ` Andy Shevchenko 0 siblings, 1 reply; 8+ messages in thread From: David Sterba @ 2015-01-07 12:22 UTC (permalink / raw) To: Giel van Schijndel Cc: linux-kernel, Armin Schindler, Karsten Keil, open list:ISDN SUBSYSTEM On Tue, Jan 06, 2015 at 08:28:04PM +0100, Giel van Schijndel wrote: > On Mon, Jan 05, 2015 at 16:00:26 +0100, David Sterba wrote: > > I'm replying to all your recent patches here as they are fixing things > > reported in http://www.viva64.com/en/b/0299/ . I'ts a good practice to > > give the credit the reporter. > > > > The blogpost also contains analyses of the issues so it could help > > reviewing the patches. > > I guess you suggest I use a 'Reported-(at|by)' line? A link in the changelog would be enough IMHO. > Would something like the below suffice? I found similar log entries in the > commit log, e.g. bf3204cb, except that those add an e-mail address for > the reporters, which I don't think is necessary in this case. If you don't have the emails, then rather do not use reported-by. ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] Fix NUL (\0 or \x00) specification in string 2015-01-07 12:22 ` David Sterba @ 2015-01-07 18:45 ` Andy Shevchenko 0 siblings, 0 replies; 8+ messages in thread From: Andy Shevchenko @ 2015-01-07 18:45 UTC (permalink / raw) To: dsterba, Giel van Schijndel, linux-kernel, Armin Schindler, Karsten Keil, open list:ISDN SUBSYSTEM On Wed, Jan 7, 2015 at 2:22 PM, David Sterba <dsterba@suse.cz> wrote: > On Tue, Jan 06, 2015 at 08:28:04PM +0100, Giel van Schijndel wrote: >> On Mon, Jan 05, 2015 at 16:00:26 +0100, David Sterba wrote: >> > I'm replying to all your recent patches here as they are fixing things >> > reported in http://www.viva64.com/en/b/0299/ . I'ts a good practice to >> > give the credit the reporter. >> > >> > The blogpost also contains analyses of the issues so it could help >> > reviewing the patches. >> >> I guess you suggest I use a 'Reported-(at|by)' line? > > A link in the changelog would be enough IMHO. > >> Would something like the below suffice? I found similar log entries in the >> commit log, e.g. bf3204cb, except that those add an e-mail address for >> the reporters, which I don't think is necessary in this case. > > If you don't have the emails, then rather do not use reported-by. Andrey Karpov <karpov@viva64.com> But it requires an additional effort to get it. -- With Best Regards, Andy Shevchenko ^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH RESEND] isdn: fix NUL (\0 or \x00) specification in string 2015-01-04 18:05 [PATCH] Fix NUL (\0 or \x00) specification in string Giel van Schijndel 2015-01-04 23:04 ` Giel van Schijndel 2015-01-05 15:00 ` David Sterba @ 2015-01-07 19:10 ` Giel van Schijndel 2015-01-12 20:32 ` David Miller 2 siblings, 1 reply; 8+ messages in thread From: Giel van Schijndel @ 2015-01-07 19:10 UTC (permalink / raw) To: linux-kernel Cc: David Sterba, Giel van Schijndel, Armin Schindler, Karsten Keil, open list:ISDN SUBSYSTEM In C one can either use '\0' or '\x00' (or '\000') to add a NUL byte to a string. '\0x00' isn't part of these and will in fact result in a single NUL followed by "x00". This fixes that. Signed-off-by: Giel van Schijndel <me@mortis.eu> Reported-at: http://www.viva64.com/en/b/0299/ --- drivers/isdn/hardware/eicon/message.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/isdn/hardware/eicon/message.c b/drivers/isdn/hardware/eicon/message.c index a82e542..0b38060 100644 --- a/drivers/isdn/hardware/eicon/message.c +++ b/drivers/isdn/hardware/eicon/message.c @@ -4880,7 +4880,7 @@ static void sig_ind(PLCI *plci) byte SS_Ind[] = "\x05\x02\x00\x02\x00\x00"; /* Hold_Ind struct*/ byte CF_Ind[] = "\x09\x02\x00\x06\x00\x00\x00\x00\x00\x00"; byte Interr_Err_Ind[] = "\x0a\x02\x00\x07\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"; - byte CONF_Ind[] = "\x09\x16\x00\x06\x00\x00\0x00\0x00\0x00\0x00"; + byte CONF_Ind[] = "\x09\x16\x00\x06\x00\x00\x00\x00\x00\x00"; byte force_mt_info = false; byte dir; dword d; -- 2.1.4 ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH RESEND] isdn: fix NUL (\0 or \x00) specification in string 2015-01-07 19:10 ` [PATCH RESEND] isdn: fix " Giel van Schijndel @ 2015-01-12 20:32 ` David Miller 0 siblings, 0 replies; 8+ messages in thread From: David Miller @ 2015-01-12 20:32 UTC (permalink / raw) To: me; +Cc: linux-kernel, dsterba, mac, isdn, netdev From: Giel van Schijndel <me@mortis.eu> Date: Wed, 7 Jan 2015 20:10:12 +0100 > In C one can either use '\0' or '\x00' (or '\000') to add a NUL byte to > a string. '\0x00' isn't part of these and will in fact result in a > single NUL followed by "x00". This fixes that. > > Signed-off-by: Giel van Schijndel <me@mortis.eu> > Reported-at: http://www.viva64.com/en/b/0299/ Applied, thank you. ^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2015-01-12 20:35 UTC | newest] Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2015-01-04 18:05 [PATCH] Fix NUL (\0 or \x00) specification in string Giel van Schijndel 2015-01-04 23:04 ` Giel van Schijndel 2015-01-05 15:00 ` David Sterba 2015-01-06 19:28 ` Giel van Schijndel 2015-01-07 12:22 ` David Sterba 2015-01-07 18:45 ` Andy Shevchenko 2015-01-07 19:10 ` [PATCH RESEND] isdn: fix " Giel van Schijndel 2015-01-12 20:32 ` David Miller
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox
Powered by JetHome