Fix Heap Corruption from too long of a TAG
snprintf has a weird return value. It returns what would have been written given a large enough buffer. In the case that the prefix is longer then our buffer(128), it messes up the calculations below possibly causing heap corruption. To avoid this we double check and set the length at the maximum (size minus null byte
Loading
Please register or sign in to comment