summaryrefslogtreecommitdiffstats
path: root/libril/ril.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'libril/ril.cpp')
-rwxr-xr-xlibril/ril.cpp15
1 files changed, 14 insertions, 1 deletions
diff --git a/libril/ril.cpp b/libril/ril.cpp
index af5a40e..c7df4af 100755
--- a/libril/ril.cpp
+++ b/libril/ril.cpp
@@ -2772,7 +2772,6 @@ static int responseCdmaInformationRecords(Parcel &p,
infoRec = &p_cur->infoRec[i];
p.writeInt32(infoRec->name);
switch (infoRec->name) {
- case RIL_CDMA_DISPLAY_INFO_REC:
case RIL_CDMA_EXTENDED_DISPLAY_INFO_REC:
if (infoRec->rec.display.alpha_len >
CDMA_ALPHA_INFO_BUFFER_LENGTH) {
@@ -2782,6 +2781,20 @@ static int responseCdmaInformationRecords(Parcel &p,
CDMA_ALPHA_INFO_BUFFER_LENGTH);
return RIL_ERRNO_INVALID_RESPONSE;
}
+ // Write as a byteArray
+ p.writeInt32(infoRec->rec.display.alpha_len);
+ p.write(infoRec->rec.display.alpha_buf,
+ infoRec->rec.display.alpha_len);
+ break;
+ case RIL_CDMA_DISPLAY_INFO_REC:
+ if (infoRec->rec.display.alpha_len >
+ CDMA_ALPHA_INFO_BUFFER_LENGTH) {
+ RLOGE("invalid display info response length %d \
+ expected not more than %d\n",
+ (int)infoRec->rec.display.alpha_len,
+ CDMA_ALPHA_INFO_BUFFER_LENGTH);
+ return RIL_ERRNO_INVALID_RESPONSE;
+ }
string8 = (char*) malloc((infoRec->rec.display.alpha_len + 1)
* sizeof(char) );
for (int i = 0 ; i < infoRec->rec.display.alpha_len ; i++) {