Bad Pattern.  Instead of writing 4k of '\0' bytes so that you can later check args[0] to tell whether sscanf failed (on the highly suspect assumption that there is no way for sscanf to get part way through filling args, then fail), skip the memset and actually check the return from sscanf() - if it's 1, args has been populated and '\0'-terminated, so there was no need to memset(); otherwise, the contents of args are indeterminate (feel free to set args[0] = '\0' at that point).