[srslte-users] Reporting bug in examples/hl_example.c
Bhargava Shastry
bshastry at sec.t-labs.tu-berlin.de
Sun Oct 4 18:13:03 UTC 2015
Hi,
I would like to report a bug in the said file [1]. Problem is on line 65
[Bug report attached]. If one calls hl_example with a negative first
argument, the program segfaults because of an unchecked failure of malloc.
A fix is to bail out with an error message if nbits is negative *before*
the call to malloc or use strtoul [2] and assign it to (unsigned long)
nbits.
[1]:
https://github.com/srsLTE/srsLTE/blob/master/srslte/examples/hl_example.c#L65
[2]: http://pubs.opengroup.org/onlinepubs/9699919799/functions/strtoul.html
Regards,
Bhargava
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.srsran.com/pipermail/srsran-users/attachments/20151004/0c5789f1/attachment.html>
More information about the srsran-users
mailing list