Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit b763b9d

Browse files
committed
Cast UCHAR_MAX to int before doing the comparison for overflow of the
B format char.
1 parent 2af72d5 commit b763b9d

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

Python/modsupport.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -247,6 +247,7 @@ do_mkvalue(char **p_format, va_list *p_va)
247247
countformat(*p_format, '}'));
248248

249249
case 'b':
250+
case 'B':
250251
case 'h':
251252
case 'i':
252253
return PyInt_FromLong((long)va_arg(*p_va, int));

0 commit comments

Comments
 (0)