This is the mail archive of the elfutils-devel@sourceware.org mailing list for the elfutils project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
On Thu, Jan 02, 2014 at 04:24:04PM +0100, Jan Kratochvil wrote: > On Wed, 25 Dec 2013 23:10:50 +0100, Mark Wielaard wrote: > > It would be zero in the very unlikely case atoi doesn't see any digits. > > If you want to check /proc files validity there should be strtol and not > atoi. > "Tgid: 42foo\n" still gets parsed as 42 by the code above. OK, it is somewhat unlikely that the /proc file would be that garbled, but with strtol we can at least detect it. Thanks, Mark
Attachment:
0001-libdwfl-linux-pid-attach.c-dwfl_linux_proc_attach-Us.patch
Description: Text document
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |