diff options
author | Krisztian Litkey <krisztian.litkey@nokia.com> | 2010-11-26 15:35:48 +0200 |
---|---|---|
committer | Krisztian Litkey <krisztian.litkey@nokia.com> | 2010-11-26 15:35:48 +0200 |
commit | 205c3e1321bfef48806887b2ec3e0b3b46816761 (patch) | |
tree | 069d742cc67b2599e64d052e5481059c6ac23377 | |
parent | a9c98a26cbc5f04ee349f251f9055f3e83f4aff1 (diff) |
Crash fix: don't smash the stack if the printed resource set is larger than the buffer size.
-rw-r--r-- | src/res-msg.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/res-msg.c b/src/res-msg.c index d5498c1..9eafced 100644 --- a/src/res-msg.c +++ b/src/res-msg.c @@ -225,7 +225,7 @@ EXPORT char *resmsg_res_str(uint32_t res, char *buf, int len) } } /* for */ - if (l > 0) + if (len > 0) snprintf(p, len, "%s(%s)", *s ? " ":"<no-resource> ", hex); return buf; |