We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a2bde63 commit d298b02Copy full SHA for d298b02
1 file changed
src/libgit2/transports/smart_pkt.c
@@ -232,7 +232,8 @@ static int set_data(
232
233
GIT_ASSERT_ARG(data);
234
235
- if ((caps = memchr(line, '\0', len)) != NULL) {
+ if ((caps = memchr(line, '\0', len)) != NULL &&
236
+ len > (size_t)((caps - line) + 1)) {
237
caps++;
238
239
if (strncmp(caps, "object-format=", CONST_STRLEN("object-format=")) == 0)
0 commit comments