[strongSwan] Question on vici_stringify implementation

Jaehong Park jaehong.park at illumio.com
Fri Aug 21 15:47:17 CEST 2015


Hi. 

I have a question on vici_stringify implementation.

vici_stringify function is calling snprintf(but, size, "%.*s”, (int)chunk.len, chunk.ptr);

and this snprintf is mapped builtin_vsnprintf in libstrongswan.

Those passing chunk data doesn’t contain null terminator as long as I can see.

And here is question. 

When I look at the implementation of builtin_vsnprinf, I see the code is trying to do strlen on second argument

which is chunk.ptr, and chunk.ptr is not null terminated.

I thought there might be builtin strlen or something, but it doesn’t look like that way.

Is this a bug or am I missing something?

Thanks.



More information about the Users mailing list