]> granicus.if.org Git - strace/commit
Robustify parsing of numbers from strings
authorDmitry V. Levin <ldv@altlinux.org>
Sun, 25 Mar 2012 21:49:48 +0000 (21:49 +0000)
committerDmitry V. Levin <ldv@altlinux.org>
Sun, 25 Mar 2012 21:49:48 +0000 (21:49 +0000)
commitccee169ab6aa4ae7515198dadcef5dd2286ede4b
tree8df6afdb677ce1348ca382293c76880890c9fd09
parent20f6b54385d2462d858419f7c67509cb3d22d155
Robustify parsing of numbers from strings

* defs.h (string_to_uint): New prototype.
* util.c (string_to_uint): New function.
* strace.c (error_opt_arg): New function.
(process_opt_p_list): Use string_to_uint instead of atoi.
Terminate in case of invalid process id.
(init): Use string_to_uint instead of atoi.
Use error_opt_arg in case of invalid option argument.
* syscall.c (qual_syscall, qual_signal, qual_desc): Use string_to_uint
instead of atoi.
defs.h
strace.c
syscall.c
util.c