From 52e32341bcab3ca814086f5c0f80feb25079cfc9 Mon Sep 17 00:00:00 2001 From: Julian Blake Kongslie Date: Tue, 28 Dec 2010 03:01:31 -0800 Subject: haha snprintf returns the stupid thing --- pinyweb/suid/piny-suid.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'pinyweb/suid') diff --git a/pinyweb/suid/piny-suid.c b/pinyweb/suid/piny-suid.c index cbbb7f1..5c5b4d3 100644 --- a/pinyweb/suid/piny-suid.c +++ b/pinyweb/suid/piny-suid.c @@ -103,7 +103,7 @@ int main( int argc, char *argv[] ) { return 1; }; - size_t sz = snprintf( NULL, 0, "/usr/share/piny-suid/%s", argv[2] ); + size_t sz = snprintf( NULL, 0, "/usr/share/piny-suid/%s", argv[2] ) + 1; char buf[sz]; snprintf( buf, sz, "/usr/share/piny-suid/%s", argv[2] ); -- cgit v1.2.3