Signed-off-by: Jason Gerecke <killert...@gmail.com> --- tools/xsetwacom.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/tools/xsetwacom.c b/tools/xsetwacom.c index fdecfb9..276f7dd 100644 --- a/tools/xsetwacom.c +++ b/tools/xsetwacom.c @@ -1210,7 +1210,10 @@ static char** strjoinsplit(int argc, char **argv, int *nwords) for (tmp = buff; tmp && *tmp != '\0'; tmp = index((const char*)tmp, ' ') + 1) (*nwords)++; - words = calloc(*nwords, sizeof(char*)); + if (!*nwords) + return NULL; + else + words = calloc(*nwords, sizeof(char*)); *nwords = 0; tok = strtok(buff, " "); -- 2.1.0 ------------------------------------------------------------------------------ Want excitement? Manually upgrade your production database. When you want reliability, choose Perforce Perforce version control. Predictably reliable. http://pubads.g.doubleclick.net/gampad/clk?id=157508191&iu=/4140/ostg.clktrk _______________________________________________ Linuxwacom-devel mailing list Linuxwacom-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linuxwacom-devel