If you have garbage at the end of your shader:
Are you storing the 0 terminator with the string in the zip file? If not (likely) your buffer to read a text file should be allocated so it has space for one extra '\0' character at the end.
Otherwise basically all methods expecting c strings will read over the end of the string since there is no marker denoting the actual end.
Actually, I tried this before I posted, but it didn't work at first. That's because what I did was this:
vs[size-1] = '\0';
I did it that way because I didn't want to go beyond what was allocated. But when I did this, it worked:
vs[size] = 0;
Now it works every time. Thanks.