Rup0rt / pcapfix

repair corrupted pcap files
http://f00l.de/pcapfix/
GNU General Public License v3.0
202 stars 34 forks source link

Fixes error connected with omitted byte while allocating memory. #9

Closed muavr closed 6 years ago

muavr commented 6 years ago

One byte should be added to cover the byte needed for the terminating null character.

I found this little mistake absolutely accidentally. Periodically I get couple strange symbols at the end of the output file name (fig. 1). I figured out that error is occurred when arg length for output file name (absolute or relative name) is equal to 184. For more details see Figure 2 and Figure 3.

Figure 1. screenshot from 2017-10-30 13-04-05

Figure 2. screenshot from 2017-10-30 13-03-23

Figure 3. screenshot from 2017-10-30 13-03-34