NUL terminate decoded base64 string

For consistency with encoded strings.
This commit is contained in:
Andrew Gaul
2015-08-19 13:40:22 -07:00
parent 76c0ef86e4
commit 15db80b459

View File

@ -362,6 +362,7 @@ unsigned char* s3fs_decode64(const char* input, size_t* plength)
}
result[wpos++] = ((parts[2] << 6) & 0xc0) | (parts[3] & 0x3f);
}
result[wpos] = '\0';
*plength = wpos;
return result;
}