Skip to content

Commit babf5ff

Browse files
committed
Fix
1 parent 1d3eab6 commit babf5ff

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

‎Objects/bytesobject.c‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2696,9 +2696,11 @@ _PyBytes_FromHex(PyObject *string, int use_bytearray)
26962696
invalid_char = str - start;
26972697
goto error;
26982698
}
2699+
26992700
str++;
27002701
if (str >= end) {
2701-
break;
2702+
invalid_char = -1;
2703+
goto error;
27022704
}
27032705

27042706
bot = _PyLong_DigitValue[*str];

0 commit comments

Comments
 (0)