xenalyze: correct symbol name length fscanf() specifier

SYMBOL_NAME_SIZE is 124, not 128. Use the symbolic name there as well,
to avoid any disconnect.

While there correct indentation on the following line as well.

Coverity ID: 1659391
Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Alejandro Vallejo <alejandro.garciavallejo@amd.com>
Acked-by: Anthony PERARD <anthony.perard@vates.tech>
master commit: dfabb3fee3
master date: 2025-07-31 14:44:02 +0200
This commit is contained in:
Jan Beulich committed 2025-08-04 15:22:34 +02:00
1 parent 7cda6b6509
commit ea5025554e
3 files changed
+5 -6

No files matched your search

-3
View File
@@ -21,9 +21,6 @@ enum {
/* Cause xs_wire.h to give us xsd_errors[]. */
#define EINVAL EINVAL
#define __STR(...) #__VA_ARGS__
#define STR(...) __STR(__VA_ARGS__)
/* GDT selector values. */
#define SEL_CODE16 0x0008
#define SEL_DATA16 0x0010
+3
View File
@@ -88,6 +88,9 @@
(type *)((char *)mptr__ - offsetof(type, member)); \
})
#define __STR(...) #__VA_ARGS__
#define STR(...) __STR(__VA_ARGS__)
#define __AC(X, Y) (X ## Y)
#define _AC(X, Y) __AC(X, Y)
+2 -3
View File
@@ -321,11 +321,10 @@ void parse_symbol_file(char *fn) {
(*p)->next=NULL;
}
/* FIXME -- use SYMBOL_NAME_SIZE */
/* FIXME -- use regexp. This won't work for symbols with spaces (yes they exist) */
(*p)->symbols[(*p)->count].addr = 0xDEADBEEF;
if ( fscanf(symbol_file, "%llx %128s",
&(*p)->symbols[(*p)->count].addr,
if ( fscanf(symbol_file, "%llx %" STR(SYMBOL_NAME_SIZE) "s",
&(*p)->symbols[(*p)->count].addr,
(*p)->symbols[(*p)->count].name) == 0 )
break;
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.