mirror of
https://github.com/hardkernel/linux.git
synced 2026-03-24 19:40:21 +09:00
modpost: Fix processing of CRCs on 32-bit build machines
commitfb27e70f6eupstream. modpost now reads CRCs from .*.cmd files, parsing them using strtol(). This is inconsistent with its parsing of Module.symvers and with their definition as *unsigned* 32-bit values. strtol() clamps values to [LONG_MIN, LONG_MAX], and when building on a 32-bit system this changes all CRCs >= 0x80000000 to be 0x7fffffff. Change extract_crcs_for_object() to use strtoul() instead. Cc: stable@vger.kernel.org Fixes:f292d875d0("modpost: extract symbol versions from *.cmd files") Signed-off-by: Ben Hutchings <ben@decadent.org.uk> Signed-off-by: Masahiro Yamada <masahiroy@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
2269be4951
commit
0e7ac17634
@@ -1722,7 +1722,7 @@ static void extract_crcs_for_object(const char *object, struct module *mod)
|
||||
if (!isdigit(*p))
|
||||
continue; /* skip this line */
|
||||
|
||||
crc = strtol(p, &p, 0);
|
||||
crc = strtoul(p, &p, 0);
|
||||
if (*p != '\n')
|
||||
continue; /* skip this line */
|
||||
|
||||
|
||||
Reference in New Issue
Block a user