2
0
mirror of https://gitlab.isc.org/isc-projects/dhcp synced 2025-08-22 09:57:20 +00:00

- Fixed a cosmetic bug where pretty-printing valid domain-search options would

result in an erroneous error log message ('garbage in format string').
  [ISC-Bugs #19327]
This commit is contained in:
David Hankins 2009-03-10 20:54:02 +00:00
parent 8d7dca581a
commit f4534b17fa
2 changed files with 20 additions and 2 deletions

View File

@ -75,6 +75,9 @@ work on other platforms. Please report any problems and suggested fixes to
- Two uninitialized stack structures are now memset to zero, thanks to a - Two uninitialized stack structures are now memset to zero, thanks to a
patch from David Cantrell at RedHat. patch from David Cantrell at RedHat.
- Fixed a cosmetic bug where pretty-printing valid domain-search options would
result in an erroneous error log message ('garbage in format string').
Changes since 4.1.0b1 Changes since 4.1.0b1
- A missing "else" in dhcrelay.c could have caused an interface not to - A missing "else" in dhcrelay.c could have caused an interface not to

View File

@ -1730,12 +1730,27 @@ const char *pretty_print_option (option, data, len, emit_commas, emit_quotes)
} }
fmtbuf [l + 1] = 0; fmtbuf [l + 1] = 0;
break; break;
case 'c':
/* The 'c' atom is a 'D' modifier only. */
log_error("'c' atom not following D atom in format "
"string: %s", option->format);
break;
case 'D':
/*
* Skip the 'c' atom, if present. It does not affect
* how we convert wire->text format (if compression is
* present either way, we still process it).
*/
if (option->format[i+1] == 'c')
i++;
fmtbuf[l + 1] = 0;
numhunk = -2;
break;
case 'd': case 'd':
fmtbuf[l] = 't'; fmtbuf[l] = 't';
/* Fall Through ! */ /* Fall Through ! */
case 't': case 't':
case 'D': fmtbuf[l + 1] = 0;
fmtbuf [l + 1] = 0;
numhunk = -2; numhunk = -2;
break; break;
case 'N': case 'N':