[Swan] vendor id mystery

D. Hugh Redelmeier hugh at mimosa.com
Tue Oct 15 07:40:18 EEST 2013


Paul fixed a crasher in programs/pluto/vendor.c (using a blunt instrument: 
the constant 256).

But I don't understand the code, before or after.

It calculated the size of a buffer based on 
strlen(ipsec_version_vendorid()) and then put in the buffer 
the string returned by ipsec_version_code().

It looks to me as the same function should be used in both places, but 
which one?

I doctored the code to eliminate a call to sprintf and in the process 
ditched the call to ipsec_version_vendorid, but is that right?


More information about the Swan mailing list