[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
UB in derivation.c
From: |
Edoardo Sanguineti |
Subject: |
UB in derivation.c |
Date: |
Tue, 1 Nov 2022 21:26:58 +0000 |
Hello,
I think I found undefined behaviour in the function all_spaces in the file
derivation.c
I believe there is a missing cast to unsigned char before the call to the
function c_isspace (see here:
https://git.savannah.gnu.org/cgit/bison.git/tree/src/derivation.c#n166).
I searched all usages of c_isspace in the source code of bison and this is
the only occurrence the cast to unsigned char is missing so I think that
should be fixed.
This is my first time sending a patch via email to a gnu project so I hope
this is the correct way to go about it.
I am unable to figure out how checkout the cvs repository locally, so I
git-cloned the official git repository and made a patch from there. I will
attach the patch to this email. I sincerely hope this is sufficient enough
for me to help.
Best,
Edoardo
0001-derivation.c-fix-undefined-behaviour-in-all_spaces.patch
Description: Binary data
- UB in derivation.c,
Edoardo Sanguineti <=