libril: Avoid strncat which doesn't check if we overflow

Change-Id: I547e071316e8b4492b9837aae2096f27c02b67db
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
tirimbino
Andreas Schneider 10 years ago committed by Ethan Chen
parent 47b2d96357
commit 3063dc12b7
  1. 2
      ril/libril/ril.cpp

@ -4418,7 +4418,7 @@ RIL_register (const RIL_RadioFunctions *callbacks) {
char rildebug[MAX_DEBUG_SOCKET_NAME_LENGTH] = SOCKET_NAME_RIL_DEBUG;
if (inst != NULL) {
strncat(rildebug, inst, MAX_DEBUG_SOCKET_NAME_LENGTH);
snprintf(rildebug, sizeof(rildebug), "%s%s", SOCKET_NAME_RIL_DEBUG, inst);
}
s_fdDebug = android_get_control_socket(rildebug);

Loading…
Cancel
Save