1. 10 Feb, 2015 1 commit
  2. 09 Feb, 2015 1 commit
    • Nick Kralevich's avatar
      ril.cpp: fix misuse of strncat · c52e45ed
      Nick Kralevich authored
      strncat(dest,src,size) appends size+1 bytes to the end of
      dest, so sizeof(dest) must be greater than
      strlen(dest) + size + 1. Passing the buffer size to strncat
      instead of sizeof(dest) - strlen(dest) - 1 is a common
      strncat bug. Use strlcat instead, as it has more intuitive
      behavior and ensures the buffer is properly null terminated.
      
      Addresses the following compiler warning:
      
        In file included from system/core/include/cutils/sockets.h:22:0,
                         from hardware/ril/libril/ril.cpp:24:
        In function 'char* strncat(char*, const char*, size_t)',
            inlined from 'void android::RIL_register(const RIL_RadioFunctions*)' at hardware/ril/libril/ril.cpp:4258:62:
        bionic/libc/include/string.h:199:61: warning: call to char* __builtin___strncat_chk(char*, const char*, unsigned int, unsigned int) might overflow destination buffer
             return __builtin___strncat_chk(dest, src, n, __bos(dest));
                                                                   ^
      
      (line numbers are from internal master and do not match AOSP)
      
      Even with this change, this code feels weird.
      MAX_DEBUG_SOCKET_NAME_LENGTH is 12, and rildebug is initialized to be
      SOCKET_NAME_RIL_DEBUG ("rild-debug"), which is 11 bytes including null
      terminator. The strlcat call here can append a maximum of 1 byte before
      the buffer is full. I don't know if this is intended or not.
      
      Change-Id: I49801ad1ea3aa6173bbc9fd7cf00f3d308693253
      c52e45ed
  3. 08 Feb, 2015 1 commit
  4. 03 Feb, 2015 1 commit
    • Nanik Tolaram's avatar
      Removal of dead code and adding log messages to make it easier · 4bd5eb59
      Nanik Tolaram authored
      for debugging
      
      - Add more logging using ALOGD(..) for function dispatchSmsWrite,
      dispatchDial, dispatchSIM_IO, dispatchSIM_APDU, dispatchCallForward,
      dispatchRaw and dispatchCdmaSmsAck. To make it easier for debugging.
      
      - Remove commented log message inside wakeTimeoutCallback () function
      and remove the else clause as it's dead not used for anything.
      
      - Modify log message inside removeFromList and removeWatch using +
      and - to make it consistent with the other log message.
      
      Change-Id: Ife0212e6a4724d8b06a1dd767484bfdf98b8e1a6
      Signed-off-by: default avatarNanik Tolaram <nanikjava@gmail.com>
      4bd5eb59
  5. 23 Jan, 2015 2 commits
  6. 09 Jan, 2015 4 commits
  7. 18 Nov, 2014 1 commit
  8. 17 Nov, 2014 1 commit
  9. 14 Oct, 2014 2 commits
  10. 02 Oct, 2014 2 commits
  11. 19 Sep, 2014 2 commits
  12. 21 Aug, 2014 1 commit
  13. 19 Aug, 2014 1 commit
  14. 15 Aug, 2014 2 commits
  15. 13 Aug, 2014 1 commit
  16. 12 Aug, 2014 1 commit
  17. 14 Aug, 2014 1 commit
  18. 12 Aug, 2014 3 commits
  19. 11 Aug, 2014 1 commit
  20. 06 Aug, 2014 1 commit
  21. 05 Aug, 2014 1 commit
  22. 06 Aug, 2014 1 commit
  23. 04 Aug, 2014 2 commits
  24. 30 Jul, 2014 2 commits
  25. 23 Jul, 2014 1 commit
  26. 22 Jul, 2014 2 commits
  27. 20 Jul, 2014 1 commit