1
0
mirror of https://github.com/systemd/systemd.git synced 2024-11-02 02:21:44 +03:00

sd-bus: use _variable_no_sanitize_address_ also for BUS_ERROR_MAP_ELF_REGISTER

This commit is contained in:
Lennart Poettering 2018-12-03 17:33:42 +01:00
parent 7fdf40d247
commit 02e062262f
2 changed files with 2 additions and 3 deletions

View File

@ -90,7 +90,6 @@ static int bus_error_name_to_errno(const char *name) {
}
m = ALIGN_TO_PTR(__start_SYSTEMD_BUS_ERROR_MAP, sizeof(void*));
#ifndef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
while (m < __stop_SYSTEMD_BUS_ERROR_MAP) {
/* For magic ELF error maps, the end marker might
* appear in the middle of things, since multiple maps
@ -108,7 +107,6 @@ static int bus_error_name_to_errno(const char *name) {
m++;
}
#endif
return EIO;
}

View File

@ -33,7 +33,8 @@ int bus_error_set_errnofv(sd_bus_error *e, int error, const char *format, va_lis
#define BUS_ERROR_MAP_ELF_REGISTER \
_section_("SYSTEMD_BUS_ERROR_MAP") \
_used_ \
_alignptr_
_alignptr_ \
_variable_no_sanitize_address_
#define BUS_ERROR_MAP_ELF_USE(errors) \
extern const sd_bus_error_map errors[]; \