aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKrisztian Litkey <krisztian.litkey@nokia.com>2010-11-26 15:35:48 +0200
committerKrisztian Litkey <krisztian.litkey@nokia.com>2010-11-26 15:35:48 +0200
commit205c3e1321bfef48806887b2ec3e0b3b46816761 (patch)
tree069d742cc67b2599e64d052e5481059c6ac23377
parenta9c98a26cbc5f04ee349f251f9055f3e83f4aff1 (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.c2
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;