diff options
| author | christos <christos@NetBSD.org> | 2015-10-11 01:01:45 +0000 |
|---|---|---|
| committer | christos <christos@NetBSD.org> | 2015-10-11 01:01:45 +0000 |
| commit | ccd2e0cac528dbbb428fa5fd7183ebe390e42d0c (patch) | |
| tree | 29eb9c3a5b72ec7fd81f7732a2e860bf44ad2f59 /external/mit/lua/dist/src/luac.c | |
| parent | a88d0929e7a752c9d44ddd96b1c59a68bff65306 (diff) | |
Get rid of the sprintf() bogus macro and use lengths explicitly when buffers
are involved.
Diffstat (limited to 'external/mit/lua/dist/src/luac.c')
| -rw-r--r-- | external/mit/lua/dist/src/luac.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/external/mit/lua/dist/src/luac.c b/external/mit/lua/dist/src/luac.c index 76b542c3335..3696b4726a5 100644 --- a/external/mit/lua/dist/src/luac.c +++ b/external/mit/lua/dist/src/luac.c @@ -1,4 +1,4 @@ -/* $NetBSD: luac.c,v 1.4 2015/10/08 13:21:00 mbalmer Exp $ */ +/* $NetBSD: luac.c,v 1.5 2015/10/11 01:01:45 christos Exp $ */ /* ** Id: luac.c,v 1.75 2015/03/12 01:58:27 lhf Exp @@ -267,7 +267,7 @@ static void PrintConstant(const Proto* f, int i) case LUA_TNUMFLT: { char buff[100]; - sprintf(buff,LUA_NUMBER_FMT,fltvalue(o)); + snprintf(buff, sizeof(buff), LUA_NUMBER_FMT,fltvalue(o)); printf("%s",buff); if (buff[strspn(buff,"-0123456789")]=='\0') printf(".0"); break; |
