Explicit seemingly random numbers are bad.  As it happens, this is 0x8000; it would be better written as such, to make clear that it's an exact power of two (rather than leaving the reader to guess or, as I did, go and ask a python session what hex(32768) is).  If it's in fact MSWIN_MAX_CMDLINE_LEN, or something similar, please call it that !

How do we know it's big enough for sum(strlen(args[i])) ?