mirror of
https://dev.iopsys.eu/bbf/bbfdm.git
synced 2025-12-10 07:44:39 +01:00
T#8720: unable to set option 43 for dhcp server
This commit is contained in:
parent
fa572e281f
commit
bbdcbf6d8a
1 changed files with 6 additions and 1 deletions
|
|
@ -1175,7 +1175,12 @@ void convert_hex_to_string(const char *hex, char *str, size_t size)
|
|||
|
||||
for (i = 0; i < len && pos < size - 1; i += 2) {
|
||||
DM_STRNCPY(buf, &hex[i], 3);
|
||||
pos += snprintf((char *)str + pos, size - pos, "%c", (char)strtol(buf, NULL, 16));
|
||||
|
||||
char c = (char)strtol(buf, NULL, 16);
|
||||
if (!char_is_valid(c))
|
||||
continue;
|
||||
|
||||
pos += snprintf((char *)str + pos, size - pos, "%c", c);
|
||||
}
|
||||
|
||||
str[pos] = '\0';
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue