rlaager / docsis

This program encodes a DOCSIS binary configuration file from a human-readable text configuration file.
http://docsis.sourceforge.net
GNU General Public License v2.0
114 stars 70 forks source link

Segfault when input is incorrect #69

Open federicoemartinez opened 4 years ago

federicoemartinez commented 4 years ago

I have tried to encode this file:

Main { DsPacketClass { ClassifierRef 1; ServiceFlowRef 1; RulePriority 0; ActivationState 1; IpPacketClassifier { IpSrcAddr 127.0.0.1; } LLCPacketClassifier { EtherType 00257; } } }

I would expect it to fail with an error, but I get segfault. I think the problem comes for the fact that the parsers put a number in yylval->intval and then the function to process an hexstring is called, which expects the value in yylval->strval;