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
// The initial design of the library was doing a backup of the byte following the data buffer because the client code
612
+
// was allowed and documented to do something like data[len] = 0; to facilitate null-terminated string handling.
613
+
// This was a bit hacky but it was working and it was documented, although completely incorrect because it was modifying a byte outside of the data buffer.
614
+
// So to fix this behavior and to avoid breaking existing client code that may be relying on this behavior, we now have to copy the data to a temporary buffer that has an extra byte for the null terminator.
// The initial design of the library was doing a backup of the byte following the data buffer because the client code
683
+
// was allowed and documented to do something like data[len] = 0; to facilitate null-terminated string handling.
684
+
// This was a bit hacky but it was working and it was documented, although completely incorrect because it was modifying a byte outside of the data buffer.
685
+
// So to fix this behavior and to avoid breaking existing client code that may be relying on this behavior, we now have to copy the data to a temporary buffer that has an extra byte for the null terminator.
0 commit comments