1. 07 Feb, 2014 1 commit
  2. 02 Feb, 2014 1 commit
  3. 27 Jan, 2014 1 commit
  4. 02 Dec, 2013 1 commit
  5. 11 Nov, 2013 2 commits
  6. 22 Sep, 2013 6 commits
    • Philippe Teuwen's avatar
      nfc-read-forum-tag3: avoid passing large struct as parameter · 117b58f5
      Philippe Teuwen authored
      Problem reported by Coverity:
      CID 1090334 (#1 of 1): Big parameter passed by value (PASS_BY_VALUE)
        pass_by_value: Passing parameter nt of type nfc_target const (size 291 bytes) by value.
      117b58f5
    • Philippe Teuwen's avatar
      nfc-relay-picc: sleep() expects unsigned int · cedbefb8
      Philippe Teuwen authored
      This avoids Coverity being unhappy that only lower bound was defined, well I hope
      
      lower_bounds: Checking lower bounds of signed scalar "waiting_time" by "waiting_time > 0".
      CID 1090343 (#1 of 1): Untrusted value as argument (TAINTED_SCALAR)
        tainted_data: Passing tainted variable "waiting_time" to a tainted sink.
        sleep(waiting_time);
      cedbefb8
    • Philippe Teuwen's avatar
      nfc-mfclassic: verify return of nfc_initiator_select_passive_target() · 61884967
      Philippe Teuwen authored
      Problem reported by Coverity:
      CID 1090323 (#1 of 1): Unchecked return value (CHECKED_RETURN)
        unchecked_value: No check of the return value of "nfc_initiator_select_passive_target(pnd, nmMifare, nt.nti.nai.abtUid, nt.nti.nai.szUidLen, NULL)".
      61884967
    • Philippe Teuwen's avatar
      Verify return of nfc_device_set_property_bool() · a4f466df
      Philippe Teuwen authored
      Problem reported by Coverity:
      CID 1090325 (#1 of 1): Unchecked return value (CHECKED_RETURN)
        unchecked_value: No check of the return value of "nfc_device_set_property_bool(pnd, NP_AUTO_ISO14443_4, false)".
      a4f466df
    • Philippe Teuwen's avatar
      nfc-emulate-forum-tag4: fix TOCTOU · 679897d0
      Philippe Teuwen authored
      Hopefully fix TOCTOU by calling fopen() before stat()
      
      At least this should prevent Coverity to complain about it:
      CID 1090346 (#1 of 1): Time of check time of use (TOCTOU)
        fs_check_call: Calling function "stat(char const *, struct stat *)" to perform check on "filename".
        toctou: Calling function "fopen(char const * restrict, char const * restrict)" that uses "filename" after a check function. This can cause a time-of-check, time-of-use race condition.
      
      Note that it seems pretty hard to avoid completely:
      https://en.wikipedia.org/wiki/Time_of_check_to_time_of_use#Preventing_TOCTTOU
      679897d0
    • Philippe Teuwen's avatar
      nfc-read-forum-tag3: remove redundant error · feb5f37a
      Philippe Teuwen authored
      switch case was redundant as getopt was already telling the issue:
      
        nfc-read-forum-tag3: option requires an argument -- 'o'
        Option -o requires an argument.
      
      This fixes also a problem reported by Coverity about missing break:
      
      CID 1090330 (#1 of 1): Missing break in switch (MISSING_BREAK)
        unterminated_case: This case (value 63) is not terminated by a 'break' statement.
      feb5f37a
  7. 21 Sep, 2013 1 commit
    • Philippe Teuwen's avatar
      Verify return of nfc_device_set_property_bool() · d9b531f5
      Philippe Teuwen authored
      Problem reported by Coverity
      CID 1090319 (#1 of 1): Unchecked return value (CHECKED_RETURN)
        unchecked_value: No check of the return value of "nfc_device_set_property_bool(pnd, NP_EASY_FRAMING, nt.nti.nai.btSak & 0x20)".
      CID 1090320 (#1 of 1): Unchecked return value (CHECKED_RETURN)
        unchecked_value: No check of the return value of "nfc_device_set_property_bool(dev, NP_HANDLE_CRC, false)".
      CID 1090324 (#1 of 2): Unchecked return value (CHECKED_RETURN)
        unchecked_value: No check of the return value of "nfc_device_set_property_bool(pnd, NP_ACTIVATE_FIELD, true)".
      CID 1090325 (#1 of 1): Unchecked return value (CHECKED_RETURN)
        unchecked_value: No check of the return value of "nfc_device_set_property_bool(pnd, NP_AUTO_ISO14443_4, false)".
      d9b531f5
  8. 19 Sep, 2013 1 commit
    • 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
  9. 09 Sep, 2013 1 commit
  10. 03 Sep, 2013 1 commit
  11. 31 Aug, 2013 2 commits
  12. 17 Jul, 2013 1 commit
  13. 02 Jul, 2013 1 commit
  14. 13 Jun, 2013 1 commit
  15. 09 Apr, 2013 1 commit
  16. 05 Apr, 2013 1 commit
  17. 12 Mar, 2013 6 commits
  18. 10 Mar, 2013 1 commit
  19. 07 Mar, 2013 2 commits
    • Alex Lian's avatar
      Windows: Clean up all compiler warnings and link warnings · 7b917f9a
      Alex Lian authored
      - Fixed the suppression of the auto-fixup for linking against MS built libs
      - Fixed all the formatting warnings by shifting to inttypes.h specifiers
      - shifted to %lu for DWORD printf
      7b917f9a
    • Alex Lian's avatar
      Convert by value passing of nfc_target to pointer for str_nfc_target and... · c72846e3
      Alex Lian authored
      Convert by value passing of nfc_target to pointer for str_nfc_target and nfc_initiator_target_is_present
      
      This becomes more consistent with all other pass by pointer of most structures.
      Additionally, this should lessen stack memory usage, as building strings with str_nfc_target would push the target (283 bytes) plus then a copy of the info objects (up to 275) onto the stack as it dives into the sprintf functions.
      
      Lastly, this makes my attempt at a .NET wrapper easier, as I can make passing by pointer work, but passing by value seems to bomb on the interop right now.
      c72846e3
  20. 06 Mar, 2013 2 commits
  21. 05 Mar, 2013 6 commits