diff options
author | Denys Vlasenko <vda.linux@googlemail.com> | 2012-04-28 14:58:35 +0200 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2012-04-28 14:58:35 +0200 |
commit | b5d43b81a8abdf17bc3aa585a66215ebe3ba3671 (patch) | |
tree | 2b1f8e75bd7c2cbaa66a117cc88712c26763b31f /defs.h | |
parent | e0bc222263cf47a43e1b26d55edb2ffadc8ccbff (diff) | |
download | strace-b5d43b81a8abdf17bc3aa585a66215ebe3ba3671.tar.gz strace-b5d43b81a8abdf17bc3aa585a66215ebe3ba3671.tar.bz2 strace-b5d43b81a8abdf17bc3aa585a66215ebe3ba3671.tar.xz |
Fix printstr's len parameter width
We often pass syscall params and other long-sized values
as printstr(len). Truncating them to int may be a bad thing.
* defs.h: Change len parameter's type from int to long in
string_quote and printstr function declarations.
* util.c (string_quote): Special-case only len==-1, not all len<0.
(printstr): Likewise.
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'defs.h')
-rw-r--r-- | defs.h | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -526,7 +526,7 @@ extern const char *getfdpath(struct tcb *, int); extern const char *xlookup(const struct xlat *, int); extern int string_to_uint(const char *str); -extern int string_quote(const char *, char *, int, int); +extern int string_quote(const char *, char *, long, int); #if HAVE_LONG_LONG /* _l refers to the lower numbered u_arg, @@ -550,7 +550,7 @@ extern int printflags(const struct xlat *, int, const char *); extern const char *sprintflags(const char *, const struct xlat *, int); extern void dumpiov(struct tcb *, int, long); extern void dumpstr(struct tcb *, long, int); -extern void printstr(struct tcb *, long, int); +extern void printstr(struct tcb *, long, long); extern void printnum(struct tcb *, long, const char *); extern void printnum_int(struct tcb *, long, const char *); extern void printpath(struct tcb *, long); |