[SR-Dev] git:andrei/switch: core: sint2str check for space before adding the sign
Andrei Pelinescu-Onciul
andrei at iptel.org
Thu Feb 19 23:50:55 CET 2009
Module: sip-router
Branch: andrei/switch
Commit: b660455a30f075efae5b0dcb082260d3ae240324
URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=b660455a30f075efae5b0dcb082260d3ae240324
Author: Andrei Pelinescu-Onciul <andrei at iptel.org>
Committer: Andrei Pelinescu-Onciul <andrei at 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)++;
}
More information about the sr-dev
mailing list