sfeed

simple feed reader - forked from git.codemadness.org/sfeed
git clone git://src.gearsix.net/sfeed
Log | Files | Refs | Atom | README | LICENSE

commit e0da2d775ac34a06949c554c61d015d076890be6
parent 74ab0e9629125dc9afd029feb822673c8544ead0
Author: Hiltjo Posthuma <hiltjo@codemadness.org>
Date:   Tue, 13 May 2014 15:44:13 +0000

sfeed: fix invalid length parameter

Signed-off-by: Hiltjo Posthuma <hiltjo@codemadness.org>

Diffstat:
Msfeed.c | 2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sfeed.c b/sfeed.c @@ -323,7 +323,7 @@ gettimetz(const char *s, char *buf, size_t bufsiz) { else if(sscanf(p, "%c%02d%02d", &c, &tzhour, &tzmin) > 0); else if(sscanf(p, "%c%d", &c, &tzhour) > 0) tzmin = 0; - snprintf(buf, sizeof(buf) - 1, "%s%c%02d%02d", tzname, c, tzhour, tzmin); + snprintf(buf, bufsiz, "%s%c%02d%02d", tzname, c, tzhour, tzmin); /* TODO: test + or - offset */ return (tzhour * 3600) + (tzmin * 60) * (c == '-' ? -1 : 1); }