Go to file
Pravat Dalbehera d1dff8d4d4 Fix for writing empty strings to Parcel::writeString8()
If writeString8 is called with the following sequence:

 writeString8(String8(""));
 writeString8(String8("TempString"));

Then in the readString8, the 2nd String i.e. "TempString" is not read,
instead an empty string is read.

The bug comes because of the write call for String8("") where there are
no String bytes present. In the write Statement, an extra ‘\0’ is
written. During the Marshalling, Following bytes are written:

1        2         3        4       5   ...
0x0      0x0       0xB      ‘T’     ‘e’  ...

The readString8 function has a check that, if String length is 0, don’t
read anything. So the first byte is read as the length for the first
string. The second byte i.e. ‘\0’ is read as the length for the second
string and hence the second string becomes empty too.

Change-Id: Id7acc0c80ae16e77be4331f1ddf69ea87e758420
2010-12-22 12:57:31 +01:00
cmds KeyStore: Update the parameters of generating master keys. 2010-10-01 01:42:55 +08:00
include am a15e4886: Merge "Framebuffer: Support variable number of framebuffers in the UI" 2010-11-17 17:29:48 -08:00
libs Fix for writing empty strings to Parcel::writeString8() 2010-12-22 12:57:31 +01:00
opengl am 17fd21fc: Merge "DO NOT MERGE. workaround [3177481] eglGetProcAddress() returns the wrong pointer for some GL extensions" into gingerbread 2010-11-10 14:15:57 -08:00
services/surfaceflinger am 7d452f69: Merge "really fix [3118445] Transform * Transform does not work as expected" into gingerbread 2010-10-27 23:46:25 -07:00
vpn
MODULE_LICENSE_APACHE2
NOTICE Adding PacketVideo attribution in NOTICE. 2010-05-06 14:15:47 -07:00