From: Arnd Bergmann <arnd@arndb.de>
To: linux-hotplug@vger.kernel.org
Subject: Re: [udev] support arguments in callout exec
Date: Thu, 20 Nov 2003 02:59:31 +0000 [thread overview]
Message-ID: <marc-linux-hotplug-106934840319536@msgid-missing> (raw)
In-Reply-To: <marc-linux-hotplug-106934057408109@msgid-missing>
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset="windows-1252", Size: 1379 bytes --]
On Thursday 20 November 2003 17:07, Kay Sievers wrote:> On Thu, Nov 20, 2003 at 01:47:36AM +0100, Arnd Bergmann wrote:> > This still doesn't look correct: args[i] will be out of bounds> > when the loop has finished on CALLOUT_MAXARG, and the args> > array is not zero terminated when calling execve.>> Good catch, but arg is not NULL if MAXARG is reached - so args is still> not terminated :)
> + char *args[CALLOUT_MAXARG];> + int i;...> + for (i=0; i < CALLOUT_MAXARG; i++) {> + args[i] = strsep(&arg, " ");> + if (args[i] = NULL)> + break;> + }> + if (args[i]) {> + dbg("to many args");> + args[i] = NULL;> + }
Ok, it's terminated now, but again out of bounds. It should bechar *args[CALLOUT_MAXARG+1];in the beginning or only loop to (CALLOUT_MAXARG - 1).
Arnd <><ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÓ+\x12\x17ùÞµéX¬²'²Þu¼ÿH_çzÑ¢½æÚrCë¢ÚðèzĨº·\x1e\x16à{ùÞ¶\x17¥§*.mé¨êk¡Û¶+Þü:\x1e²+azZr¢ç+y«^mëmz·(uïÒ\x1c\x04DLq\v9QÿjwazZn²\x17¥¥ü)brAÞïá¶Úÿÿû(º·\x1e~à{ùÞ·÷h«^ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ.)îÇøh¶n÷^½éfj)b b²Øm¶ÿþX§»\x1fá¢Úeº\x0fì¢êÜyú+ïçzÒâìÿièÿuëÞùb²Ûÿ²«qçè®\aÿëa¶ÚlÿÿåËlþÊ.Ç¢¸\x1eþwþX¬¶ÏåËbú?)îÇøh¶n÷^
next prev parent reply other threads:[~2003-11-20 2:59 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-11-20 0:47 [udev] support arguments in callout exec Arnd Bergmann
2003-11-20 2:59 ` Arnd Bergmann [this message]
2003-11-20 3:21 ` Kay Sievers
2003-11-20 12:31 ` Kay Sievers
2003-11-20 16:07 ` Kay Sievers
2003-11-20 17:31 ` Kay Sievers
2003-11-20 20:14 ` Arnd Bergmann
2003-11-21 6:50 ` Greg KH
2003-11-21 6:53 ` Greg KH
2003-11-22 18:14 ` Greg KH
-- strict thread matches above, loose matches on Subject: below --
2003-11-20 1:42 Kay Sievers
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=marc-linux-hotplug-106934840319536@msgid-missing \
--to=arnd@arndb.de \
--cc=linux-hotplug@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).