We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
omicli always crashes on this request for me:
$ omicli -t -xml -u ... -p ... --hostname ... gi root/cimv2 '{' Win32_Service name spooler '}'
The crash happens here when accessing the "_encode" array outside of its bounds:
Program terminated with signal SIGSEGV, Segmentation fault. #0 0x000000000040fd3b in WriteBuffer_Char (clientBuffer=0x1df59f0 "<INSTANCE CLASSNAME="Win32_Service"><PROPERTY NAME="AcceptPause" TYPE="string">false<PROPERTY NAME="AcceptStop" TYPE="string">true<PROPERTY NAME="Ca"..., clientBufferLength=10000, clientBufferNeeded=0x7ffccb193ecc, charToWrite=-30 '\342', escapingDepth=1, result=0x7ffccb193e18) at xmlserializer.c:894 894 (_encode[(unsigned int)charToWrite].str == NULL))
Here's the interesting part of the received string - the problematic character being E2:
$ tail -1 omiclient-recv.trc | xxd ... 0000490: 7365 7276 6963 652c 2079 6f75 2077 6f6e service, you won 00004a0: e280 9974 2062 6520 6162 6c65 2074 6f20 ...t be able to 00004b0: 7072 696e 7420 6f72 2073 6565 2079 6f75 print or see you 00004c0: 7220 7072 696e 7465 7273 2e3c 2f70 3a44 r printers.</p:D ...
The fix is simple - just ensure array index is OK before accessing it.
The text was updated successfully, but these errors were encountered:
XML handling of chars outside normal range fail
ee64cb8
xml.c was a hang, xmlserializer.c was a crash. Fixes issue #196
933f490
No branches or pull requests
omicli always crashes on this request for me:
$ omicli -t -xml -u ... -p ... --hostname ... gi root/cimv2 '{' Win32_Service name spooler '}'
The crash happens here when accessing the "_encode" array outside of its bounds:
Program terminated with signal SIGSEGV, Segmentation fault.
#0 0x000000000040fd3b in WriteBuffer_Char (clientBuffer=0x1df59f0 "<INSTANCE CLASSNAME="Win32_Service"><PROPERTY NAME="AcceptPause" TYPE="string">false<PROPERTY NAME="AcceptStop" TYPE="string">true<PROPERTY NAME="Ca"..., clientBufferLength=10000, clientBufferNeeded=0x7ffccb193ecc, charToWrite=-30 '\342', escapingDepth=1, result=0x7ffccb193e18) at xmlserializer.c:894
894 (_encode[(unsigned int)charToWrite].str == NULL))
Here's the interesting part of the received string - the problematic character being E2:
$ tail -1 omiclient-recv.trc | xxd
...
0000490: 7365 7276 6963 652c 2079 6f75 2077 6f6e service, you won
00004a0: e280 9974 2062 6520 6162 6c65 2074 6f20 ...t be able to
00004b0: 7072 696e 7420 6f72 2073 6565 2079 6f75 print or see you
00004c0: 7220 7072 696e 7465 7273 2e3c 2f70 3a44 r printers.</p:D
...
The fix is simple - just ensure array index is OK before accessing it.
The text was updated successfully, but these errors were encountered: