[asterisk-dev] [Code Review] 3599: menuselect fails to read config when all resource modules are disabled
rmudgett
reviewboard at asterisk.org
Fri Jun 6 22:00:06 CDT 2014
> On June 6, 2014, 9:41 p.m., Matt Jordan wrote:
> > /trunk/menuselect.c, lines 1258-1260
> > <https://reviewboard.asterisk.org/r/3599/diff/1/?file=59389#file59389line1258>
> >
> > As much as I'd like to hit 'Ship It!', I'm pretty sure this is going blow up people trying to use menuselect on embedded systems.
> >
> > 8k is a pretty big stack allocation...
> >
> > We're using fgets here to parse out the file - what line length is exceeding 2k in that file?
> >
> > Another option here would be to allocate a buffer on the heap, read chunks in 2k sizes, add the contents to the buffer, and grow + add until we've read a full line.
> >
Might I ask why menuselect would be run on an embedded system and not by the development machine that compiles Asterisk?
- rmudgett
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviewboard.asterisk.org/r/3599/#review12093
-----------------------------------------------------------
On June 6, 2014, 1:59 p.m., Corey Farrell wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviewboard.asterisk.org/r/3599/
> -----------------------------------------------------------
>
> (Updated June 6, 2014, 1:59 p.m.)
>
>
> Review request for Asterisk Developers.
>
>
> Bugs: ASTERISK-23830
> https://issues.asterisk.org/jira/browse/ASTERISK-23830
>
>
> Repository: Menuselect
>
>
> Description
> -------
>
> menuselect reads config using a char buf[2048]. This is too small if all resource modules are disabled - causing the last modules listed to be re-enabled. This change expands the buffer to 8192.
>
>
> Diffs
> -----
>
> /trunk/menuselect.c 1157
>
> Diff: https://reviewboard.asterisk.org/r/3599/diff/
>
>
> Testing
> -------
>
> make menuselect, disabled all resource modules, saved and went back in to verify all resource modules were still disabled.
>
>
> Thanks,
>
> Corey Farrell
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-dev/attachments/20140607/42a8eff0/attachment.html>
More information about the asterisk-dev
mailing list