diff --git a/libs/System.c b/libs/System.c index 70dc51ef3..da34d2644 100644 --- a/libs/System.c +++ b/libs/System.c @@ -69,7 +69,7 @@ int getostype(char *buf, int max) if (uname( &sysname ) >= 0) { buf[0] = '\0'; - strncat(buf, sysname.sysname, max); + strncat(buf, sysname.sysname, max - 1 ); return 0; } #endif