Module: sip-router
Branch: andrei/switch
Commit: b660455a30f075efae5b0dcb082260d3ae240324
URL:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=b660455…
Author: Andrei Pelinescu-Onciul <andrei(a)iptel.org>
Committer: Andrei Pelinescu-Onciul <andrei(a)iptel.org>
Date: Thu Feb 19 19:17:13 2009 +0100
core: sint2str check for space before adding the sign
---
ut.h | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/ut.h b/ut.h
index 013f963..be79f5d 100644
--- a/ut.h
+++ b/ut.h
@@ -312,7 +312,7 @@ static inline char* sint2str(long l, int* len)
l = -l;
}
p = int2str((unsigned long)l, len);
- if(sign) {
+ if(sign && *len<(INT2STR_MAX_LEN-1)) {
*(--p) = '-';
if (len) (*len)++;
}