Fix for #3482, the empty value occurs when no service pack is present. The fix simply tests for this. Also remove the two unused params on the _snprintf call.

git-svn-id: file:///home/svn/framework3/trunk@11542 4d416f70-5f16-0410-b530-b9f4589650da
unstable
Stephen Fewer 2011-01-11 14:29:16 +00:00
parent f001463ed1
commit 41e5a4c61d
3 changed files with 4 additions and 2 deletions

View File

@ -381,8 +381,10 @@ DWORD request_sys_config_sysinfo(Remote *remote, Packet *packet)
if (!osName)
osName = "Unknown";
_snprintf(buf, sizeof(buf) - 1, "%s (Build %lu, %s).", osName,
v.dwBuildNumber, v.szCSDVersion, osArch, osWow );
if( strlen( v.szCSDVersion ) > 0 )
_snprintf(buf, sizeof(buf) - 1, "%s (Build %lu, %s).", osName, v.dwBuildNumber, v.szCSDVersion );
else
_snprintf(buf, sizeof(buf) - 1, "%s (Build %lu).", osName, v.dwBuildNumber );
packet_add_tlv_string(response, TLV_TYPE_OS_NAME, buf);