List Info

Thread: CR: Buffer Copying Data Pass End of String in About Box




CR: Buffer Copying Data Pass End of String in About Box
user name
2007-10-25 11:07:36

"Nokia submits this code under the terms of a commercial contribution agreement with RealNetworks, and I am authorized to contribute this code under said agreement."

Modified by:  Shy.Wardnokia.com

Reviewed by:

Date: 25-Oct-2007

Project: SymbianMmf_Rel

TSW: DALM-72ZSB6

Synopsis: Buffer Copying Data Pass End of String in About Box

The buffer copy of a string, containing the platform ID, was not accounting for the NULL terminator resulting in garbage being displayed in the

about box in the Media Player. The code has been modified to copy the NULL terminator along with the string.

Root Cause of the problem: Design & Implementation.

Files Modified:

cvsroot/clientapps/symbianMmf/hxmmfconfigutil.cpp


Image Size and Heap Use impact: minor.
   

Module Release testing (STIF): Pass

Test case(s) Added: none

Memory leak check performed: Yes, no new leaks introduced.

Platforms and Profiles Build Verified:
    armv5 / helix-client-s60-32-mmf-mdf-arm
    winscw / helix-client-s60-32-mmf-mdf-arm


Branch:
    HEAD and hxclient_2_1_0_cayennes

Index: hxmmfconfigutil.cpp
===================================================================
RCS file: /cvsroot/clientapps/symbianMmf/hxmmfconfigutil.cpp,v
retrieving revision 1.2.2.4
diff -w -u -b -r1.2.2.4 hxmmfconfigutil.cpp
--- hxmmfconfigutil.cpp 12 Jan 2007 18:25:22 -0000 ;     1.2.2.4
+++ hxmmfconfigutil.cpp 25 Oct 2007 14:55:49 -0000
-439,7 +439,7
     {
         HX_ADDREF(pBuffer);
         // TARVER_STR_PLATFORM is read from commonincludeplatform.h
-        pBuffer->Set((const unsigned char*) TARVER_STR_PLATFORM, strlen(TARVER_STR_PLATFORM));
+        pBuffer->Set((const unsigned char*) TARVER_STR_PLATFORM, strlen(TARVER_STR_PLATFORM)+1);
         pInfo->AddKeyValue(MMFCONTROLLERBLDDATE, pBuffer);
         HX_RELEASE(pBuffer);
     }



Re: CR: Buffer Copying Data Pass End of String in About Box
country flaguser name
United States
2007-10-25 11:55:39
Looks good.
--greg.

Shy.Wardnokia.com wrote:
> "Nokia submits this code under the terms of a
commercial contribution
> agreement with RealNetworks, and I am authorized to
contribute this code
> under said agreement."
> 
> Modified by:  Shy.Wardnokia.com
> 
> Reviewed by: 
> 
> Date: 25-Oct-2007
> 
> Project: SymbianMmf_Rel
> 
> TSW: DALM-72ZSB6
> 
> Synopsis: Buffer Copying Data Pass End of String in
About Box
> 
> The buffer copy of a string, containing the platform
ID, was not
> accounting for the NULL terminator resulting in garbage
being displayed
> in the
> about box in the Media Player. The code has been
modified to copy the
> NULL terminator along with the string.
> 
> Root Cause of the problem: Design &
Implementation.
> 
> Files Modified:
> 
> cvsroot/clientapps/symbianMmf/hxmmfconfigutil.cpp
> 
> 
> Image Size and Heap Use impact: minor.
>     
> 
> Module Release testing (STIF): Pass
> 
> Test case(s) Added: none
> 
> Memory leak check performed: Yes, no new leaks
introduced.
> 
> Platforms and Profiles Build Verified: 
>     armv5 / helix-client-s60-32-mmf-mdf-arm
>     winscw / helix-client-s60-32-mmf-mdf-arm
> 
> 
> Branch: 
>     HEAD and hxclient_2_1_0_cayennes
> 
> Index: hxmmfconfigutil.cpp
>
============================================================
=======
> RCS file:
/cvsroot/clientapps/symbianMmf/hxmmfconfigutil.cpp,v
> retrieving revision 1.2.2.4
> diff -w -u -b -r1.2.2.4 hxmmfconfigutil.cpp
> --- hxmmfconfigutil.cpp 12 Jan 2007 18:25:22 -0000     
1.2.2.4
> +++ hxmmfconfigutil.cpp 25 Oct 2007 14:55:49 -0000
>  -439,7 +439,7 
>      {
>          HX_ADDREF(pBuffer);
>          // TARVER_STR_PLATFORM is read from
commonincludeplatform.h
> -        pBuffer->Set((const unsigned char*)
TARVER_STR_PLATFORM,
> strlen(TARVER_STR_PLATFORM));
> +        pBuffer->Set((const unsigned char*)
TARVER_STR_PLATFORM,
> strlen(TARVER_STR_PLATFORM)+1);
>          pInfo->AddKeyValue(MMFCONTROLLERBLDDATE,
pBuffer);
>          HX_RELEASE(pBuffer);
>      }
> 
> 
> 
> 
> 
> 
>
------------------------------------------------------------
------------
> 
> _______________________________________________
> Clientapps-dev mailing list
> Clientapps-devhelixcommunity.org
> http://lists.helixcommunity.org/mailman/listinfo/
clientapps-dev


_______________________________________________
Clientapps-dev mailing list
Clientapps-devhelixcommunity.org
http://lists.helixcommunity.org/mailman/listinfo/
clientapps-dev

[1-2]

about | contact  Other archives ( Real Estate discussion Medical topics )