corruption unless complete zero-ize of struct iso1EXIDocument output
Since I have not received any feedback, I assume that the answer was/is satisfactory. In summary, it is simply the case that arrays (for character strings, bytes, etc.) must be initialized manually. However, this is also standard practice in C.
Hi, I checked your code and I think there is one missing piece. OpenV2G does not (properly?) initialize datastructures for bytes and string (internal struct in struct) and expects the user to set the data. Hence according to my testing memset(&exiOut, 0, sizeof(exiOut)); is not needed. Remving it does not show any problem with your code. IF you initialize byte and string arrays.. like you do in exiOut.V2G_Message.Header.SessionID.bytesLen = 8; memset(exiOut.V2G_Message.Header.SessionID.bytes, 0xA5,...
Hi, Thank you for reporting the problem. For now I did not have more time than running your demo. I can't really understand why the init_ methods don't work as expected for union. I'll have to take a closer look at the code. for example https://sourceforge.net/p/openv2g/code/HEAD/tree/trunk/src/iso1/iso1EXIDatatypes.c#l44 sets the XXX_isUsed to zero which should prevent to run into other union memory parts. 🤔 Mhhh, I hope I can find time to look into soon... unless you beat me with the explanation....
refactor: add tag 0.9..6
refactor: iso90
docs: update docs for version 0.9.6
fix: overflow when decoding large integer numbers