Modify

Opened 3 years ago

Closed 3 years ago

#17864 closed defect (fixed)

procd/inittab.c MAX_ARGS handling error.

Reported by: anonymous Owned by: developers
Priority: low Milestone:
Component: base system Version: Trunk
Keywords: procd inittab Cc:

Description

I was just browsing some of the new-ish daemons in OpenWrt and saw a small error where procd parses inittab. On line 282 it parses the command to be run by splitting on space characters and assigning each arg to an array. But the length limiting comparison of the for loop seems to have a spurious -i in it meaning that it will only read 4 arguments instead of 7:

for (i = 0; i < (MAX_ARGS - i - 1) && tok; i++)

Attachments (0)

Change History (2)

comment:1 Changed 3 years ago by anonymous

Oh also, I am not sure the listing of projects on http://nbd.name/gitweb.cgi is complete. For instance http://nbd.name/gitweb.cgi?p=luci2/libubox.git doesn't show up on there.

comment:2 Changed 3 years ago by blogic

  • Resolution set to fixed
  • Status changed from new to closed

pushed the fix to procd.git. thanks for the report. i will update procd in trunk during the day after i looked at 2 more bug reports

http://nbd.name/gitweb.cgi?p=luci2/procd.git;a=commit;h=c1a558f7d0c1e6c1ffa5a47d557a7b45205eef1d

Add Comment

Modify Ticket

Action
as closed .
The resolution will be deleted. Next status will be 'reopened'.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.