1. 19 Sep, 2013 2 commits
    • Ludovic Rousseau's avatar
      Fix use after free bug · 107b4ece
      Ludovic Rousseau authored
      nfc_exit(context); was called 2 times
      
      CID 1090348 (#1 of 1): Use after free (USE_AFTER_FREE)53. deref_arg:
      Calling "nfc_exit(nfc_context *)" dereferences freed pointer "context".
      (The dereference is assumed on the basis of the 'nonnull' parameter
      attribute.)
      107b4ece
    • Ludovic Rousseau's avatar
      Remove dead code · 967f6e56
      Ludovic Rousseau authored
      The switch case has a default rule and a return in every cases. So the
      code after the switch will never be executed.
      
      Problem reported by thei Coverity tool
      CID 1090408 (#1 of 1): Structurally dead code (UNREACHABLE)unreachable:
      This code cannot be reached: "if (pn53x_current_target_ne...".
      967f6e56
  2. 10 Sep, 2013 3 commits
  3. 09 Sep, 2013 1 commit
  4. 07 Sep, 2013 1 commit
  5. 03 Sep, 2013 8 commits
  6. 31 Aug, 2013 3 commits
  7. 29 Aug, 2013 8 commits
  8. 19 Aug, 2013 2 commits
  9. 17 Jul, 2013 1 commit
  10. 02 Jul, 2013 6 commits
    • Philippe Teuwen's avatar
      Fix warning Function call argument is an uninitialized value · 18fe3304
      Philippe Teuwen authored
      acr122_usb.c:237:3: warning: Function call argument is an uninitialized value
        LOG_HEX(NFC_LOG_GROUP_COM, "TX", abtTx, szTx);
        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      ../../libnfc/log.h:107:7: note: expanded from macro 'LOG_HEX'
            snprintf (__acBuf + __szBuf, sizeof(__acBuf) - __szBuf, "%02x ",((uint8_t *)(pbtData))[__szPos]); \
            ^                                                               ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      
      Maybe a side effect of the #pragma pack not properly understood by the static analyser
      but anyway acr122_usb_frame_template is also used the same way to initialize the other frames
      18fe3304
    • Philippe Teuwen's avatar
      make style · 2db4a0e7
      Philippe Teuwen authored
      new version of astyle, better separation of XOR
      2db4a0e7
    • Philippe Teuwen's avatar
      Fix warning about garbage value · a5d40cef
      Philippe Teuwen authored
      acr122s.c:196:23: warning: The left operand of '<<' is a garbage value
        size_t frame_size = FRAME_SIZE(frame);
                            ^          ~~~~~~
      acr122s.c:76:24: note: expanded from macro 'FRAME_SIZE'
                             ^
      acr122s.c:74:47: note: expanded from macro 'APDU_SIZE'
      a5d40cef
    • Philippe Teuwen's avatar
      Fix warnings Null pointer passed as an argument to a nonnull parameter · 5cda3af5
      Philippe Teuwen authored
      acr122s.c:331:3: warning: Null pointer passed as an argument to a 'nonnull' parameter
        memcpy(buf, data, data_size);
        ^           ~~~~
      
      pn53x.c:3138:3: warning: Null pointer passed as an argument to a 'nonnull' parameter
        memcpy(CHIP_DATA(pnd)->current_target, pnt, sizeof(nfc_target));
        ^                                      ~~~
      5cda3af5
    • Philippe Teuwen's avatar
      Fix warning increasing required alignment · 56e9f197
      Philippe Teuwen authored
      acr122_usb.c:513:20: warning: cast from 'uint8_t *' (aka 'unsigned char *') to 'uint32_t *' (aka 'unsigned int *') increases required alignment from 1 to 4 [-Wcast-align]
        uint32_t *pu32 = (uint32_t *)u8;
                         ^~~~~~~~~~~~~~
      56e9f197
    • Philippe Teuwen's avatar
      Fix warning about incompatible types · cc7c0c32
      Philippe Teuwen authored
      pn53x.c:85:57: warning: Result of 'malloc' is converted to a pointer of type 'nfc_modulation_type', which is incompatible with sizeof operand type 'nfc_modulation'
          CHIP_DATA(pnd)->supported_modulation_as_initiator = malloc(sizeof(nfc_modulation) * 9);
                                                              ^~~~~~ ~~~~~~~~~~~~~~~~~~~~~~
      cc7c0c32
  11. 22 Jun, 2013 1 commit
  12. 15 Jun, 2013 4 commits