CyberShadow / dhcptest

Cross-platform DHCP test client
https://blog.cy.md/2013/01/10/dhcp-test-client
366 stars 57 forks source link

Format typo for option 46 leading to crash #16

Closed olivierIllogika closed 4 years ago

olivierIllogika commented 6 years ago

Got an exception when parsing option 46:

std.format.FormatException@/usr/local/opt/dmd/include/dlang/dmd/std/format.d(1257): Incorrect format specifier: %(%s, %s)

This change seems to fix it, but I've never touch D before.

        case OptionFormat.netbiosNodeType:
        enforce(bytes.length==1, "Bad netbiosNodeType data length");
-           f.writefln("%-(%s, %s)", bytes
+           f.writefln("%-(%s, %)", bytes
CyberShadow commented 6 years ago

Yes, that's the correct fix, thanks!

CyberShadow commented 4 years ago

This was fixed in 9f467b892739237c507aabc81eb8310f036aa15e.