AST-2009-005

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.0@211551 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Tilghman Lesher
2009-08-10 19:25:03 +00:00
parent bcea4ddd2a
commit 2662264c44
83 changed files with 413 additions and 400 deletions

View File

@@ -1607,7 +1607,7 @@ int ast_get_timeval(const char *src, struct timeval *dst, struct timeval _defaul
return -1;
/* only integer at the moment, but one day we could accept more formats */
if (sscanf(src, "%Lf%n", &dtv, &scanned) > 0) {
if (sscanf(src, "%30Lf%n", &dtv, &scanned) > 0) {
dst->tv_sec = dtv;
dst->tv_usec = (dtv - dst->tv_sec) * 1000000.0;
if (consumed)
@@ -1634,7 +1634,7 @@ int ast_get_time_t(const char *src, time_t *dst, time_t _default, int *consumed)
return -1;
/* only integer at the moment, but one day we could accept more formats */
if (sscanf(src, "%ld%n", &t, &scanned) == 1) {
if (sscanf(src, "%30ld%n", &t, &scanned) == 1) {
*dst = t;
if (consumed)
*consumed = scanned;