You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
On Windows systems, the handling of SpvOpSourceContinued will crash in the call to strcat_s in cases where both source_len and embedded_source_len are not zero. According to the strcat_s documentation:
“The behavior is undefined if the size of the character array pointed to by dest < strlen(dest)+strlen(src)+1 <= destsz”
In the case both source_len and embedded_source_len are not zero, the current code will have “destsz” < “strlen(dest)+strlen(src)+1”.
On Windows systems, the handling of SpvOpSourceContinued will crash in the call to strcat_s in cases where both source_len and embedded_source_len are not zero. According to the strcat_s documentation:
“The behavior is undefined if the size of the character array pointed to by dest < strlen(dest)+strlen(src)+1 <= destsz”
In the case both source_len and embedded_source_len are not zero, the current code will have “destsz” < “strlen(dest)+strlen(src)+1”.
I think the code should read as follows:
It is also more correct to define embedded_source_len as follows:
const size_t embedded_source_len = p_parser->source_embedded ? strlen(p_parser->source_embedded) : 0;
The text was updated successfully, but these errors were encountered: