1. 06 Jun, 2019 3 commits
  2. 14 May, 2019 2 commits
    • Peter Maatman's avatar
      examples: Remove sleep call in enroll examples · 6ba9439b
      Peter Maatman authored
      The call to sleep(1) inside of the enrollment loop caused a crash
      on at least the etes603 driver.
      
      Because in fp_enroll_finger_img the function enters an event
      handling loop. This loop needs to start before the next libusb
      event timeout. Which would not happen in the etes603 driver
      because the timeout there was set to 1 second as well.
      6ba9439b
    • Peter Maatman's avatar
      etes603: Prevent hang during enroll process · 6764ec79
      Peter Maatman authored
      This commit fixes a hang in gnome-settings when trying to enroll a finger.
      
      The same issue could be seen in the enroll example. Previously the enroll
      example would hang on "deactivating" because at some point dev->is_active
      is set to false and m_exit_start is never called.
      6764ec79
  3. 06 May, 2019 1 commit
  4. 21 Mar, 2019 1 commit
  5. 21 Feb, 2019 1 commit
    • Seong-Joong Kim's avatar
      uru4000: Fix integer overflow in imaging_run_state() · ca26e85f
      Seong-Joong Kim authored
      ‘img->key_number’ variable is originally from the device through bulk
      endpoint of USB. The variable is immediately assigned to ‘buf[0]’ for
      sending to control endpoint of the device. Here, integer overflow may
      occur when the ‘img->key_number’ attempts to assign a value that is
      outside of type range of ‘char’ to the ‘buf[0]’
      ca26e85f
  6. 21 Jan, 2019 3 commits
  7. 30 Dec, 2018 1 commit
  8. 14 Dec, 2018 1 commit
  9. 13 Dec, 2018 12 commits
  10. 12 Dec, 2018 15 commits
    • Bastien Nocera's avatar
      mindtct: Fix uninitialised value usage in count_minutia_ridges() · a218437c
      Bastien Nocera authored
      libfprint/nbis/mindtct/ridges.c:153:7: warning: 1st function call argument is an uninitialized value
            free(nbr_list);
            ^~~~~~~~~~~~~~
      a218437c
    • Bastien Nocera's avatar
      bozorth3: Remove unused assignments in bz_match_score() · 0add0ca9
      Bastien Nocera authored
      libfprint/nbis/bozorth3/bozorth3.c:704:1: warning: Value stored to 'kx' is never read
      kx  = 0;
      ^     ~
      libfprint/nbis/bozorth3/bozorth3.c:820:4: warning: Value stored to 'l' is never read
                              l = 1;
                              ^   ~
      0add0ca9
    • Bastien Nocera's avatar
      mindtct: Fix memory leaks in get_centered_contour() · eaa4aa96
      Bastien Nocera authored
      The first contour wasn't freed if we failed on the second contour.
      
      libfprint/nbis/mindtct/contour.c:521:14: warning: Potential leak of memory pointed to by 'half1_ex'
            return(ret);
                   ^~~
      libfprint/nbis/mindtct/contour.c:521:14: warning: Potential leak of memory pointed to by 'half1_ey'
            return(ret);
                   ^~~
      libfprint/nbis/mindtct/contour.c:521:14: warning: Potential leak of memory pointed to by 'half1_x'
            return(ret);
                   ^~~
      libfprint/nbis/mindtct/contour.c:521:14: warning: Potential leak of memory pointed to by 'half1_y'
            return(ret);
                   ^~~
      eaa4aa96
    • Bastien Nocera's avatar
      mindtct: Fix "garbage value" error in dft_dir_powers() · 74bb899c
      Bastien Nocera authored
      libfprint/nbis/mindtct/dft.c:212:30: warning: The left operand of '*' is a garbage value
            cospart += (rowsums[i] * wave->cos[i]);
                        ~~~~~~~~~~ ^
      74bb899c
    • Bastien Nocera's avatar
      elan: Fix "garbage value" errors in elan_cmd_cb() · 69fe7a1b
      Bastien Nocera authored
      libfprint/drivers/elan.c:351:4: warning: 2nd function call argument is an uninitialized value
                              dbg_buf(elandev->last_read, transfer->actual_length);
                              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      libfprint/drivers/elan.c:46:5: note: expanded from macro 'dbg_buf'
          fp_dbg("%02x", buf[0]);                                  \
          ^~~~~~~~~~~~~~~~~~~~~~
      ../../../../../../Projects/jhbuild/libfprint/libfprint/fpi-log.h:52:16: note: expanded from macro 'fp_dbg'
       #define fp_dbg g_debug
                     ^
      libfprint/drivers/elan.c:351:4: warning: The left operand of '<<' is a garbage value
                              dbg_buf(elandev->last_read, transfer->actual_length);
                              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      libfprint/drivers/elan.c:48:27: note: expanded from macro 'dbg_buf'
          fp_dbg("%04x", buf[0] << 8 | buf[1]);                    \
                         ~~~~~~ ^
      libfprint/drivers/elan.c:351:4: warning: The left operand of '<<' is a garbage value
                              dbg_buf(elandev->last_read, transfer->actual_length);
                              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      libfprint/drivers/elan.c:50:41: note: expanded from macro 'dbg_buf'
          fp_dbg("%04x... (%d bytes)", buf[0] << 8 | buf[1], len)
                                       ~~~~~~ ^
      69fe7a1b
    • Bastien Nocera's avatar
      elan: Assert on a possible division by zero in elan_need_calibration() · ce856efa
      Bastien Nocera authored
      libfprint/drivers/elan.c:598:10: warning: Division by zero
              bg_mean /= frame_size;
              ~~~~~~~~^~~~~~~~~~~~~
      ce856efa
    • Bastien Nocera's avatar
      elan: Assert on a possible division by zero in elan_process_frame_linear() · b54514df
      Bastien Nocera authored
      libfprint/drivers/elan.c:249:26: warning: Division by zero
                      px = (px - min) * 0xff / (max - min);
                           ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~
      b54514df
    • Bastien Nocera's avatar
      aesx660: Fix memory leak in process_stripe_data() · 551616c3
      Bastien Nocera authored
      libfprint/drivers/aesx660.c:292:10: warning: Potential leak of memory pointed to by 'stripe'
                      return 0;
                             ^
      551616c3
    • Bastien Nocera's avatar
      aeslib: Fix memory leak in aes_write_regv() · cec307ce
      Bastien Nocera authored
      libfprint/drivers/aeslib.c:156:1: warning: Potential leak of memory pointed to by 'wdata'
      }
      ^
      cec307ce
    • Bastien Nocera's avatar
    • Bastien Nocera's avatar
      upeksonly: Fix possible division by zero in upeksonly_get_deviation2() · 9a025bde
      Bastien Nocera authored
      By asserting if we have a zero line width.
      
      libfprint/drivers/upeksonly.c:118:7: warning: Division by zero
              mean /= (ctx->line_width / 2);
              ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~
      9a025bde
    • Bastien Nocera's avatar
      uru4000: Fix memory leak on error in dev_init() · 6845e400
      Bastien Nocera authored
      libfprint/drivers/uru4000.c:1357:3: warning: Potential leak of memory pointed to by 'urudev'
                      fp_err("could not get encryption slot");
                      ^~~~~~
      6845e400
    • Bastien Nocera's avatar
      uru4000: Fix unused value in sm_read_regs() · 25d0fa42
      Bastien Nocera authored
      We don't need to assign urudev if we only want the size of one of its
      members.
      
      libfprint/drivers/uru4000.c:554:20: warning: Value stored to 'urudev' during its initialization is never read
              struct uru4k_dev *urudev = FP_INSTANCE_DATA(FP_DEV(dev));
                                ^~~~~~   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      25d0fa42
    • Bastien Nocera's avatar
      lib: Fix baroque code in fp_discover_prints() · 52208a66
      Bastien Nocera authored
      Use GPtrArray to simplify the implementation.
      
      libfprint/fpi-data.c:777:13: warning: Access to field 'data' results in a dereference of a null pointer (loaded from variable 'elem')
                      list[i] = elem->data;
                                ^~~~~~~~~~
      52208a66
    • Bastien Nocera's avatar
      lib: Fix uninitialised value in fp_print_data_load() · 6725b22f
      Bastien Nocera authored
      libfprint/fpi-data.c:497:7: warning: 2nd function call argument is an uninitialized value
              if (!fp_dev_supports_print_data(dev, fdata)) {
                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      6725b22f