Skip to content

Instantly share code, notes, and snippets.

@neheb
Created November 15, 2016 23:50
Show Gist options
  • Save neheb/90a5147fd445d8aa57f9ff48aaac2a1f to your computer and use it in GitHub Desktop.
Save neheb/90a5147fd445d8aa57f9ff48aaac2a1f to your computer and use it in GitHub Desktop.
cppcheck hashcat
[src/cpu_crc32.c:95]: (error) Resource leak: fd
[src/dispatch.c:417]: (error) Resource leak: fd
[src/dispatch.c:447]: (error) Resource leak: fd
[src/dispatch.c:462]: (style) The scope of the variable 'words_off' can be reduced.
[src/folder.c:146]: (portability) Non reentrant function 'readdir' called. For threadsafe applications it is recommended to use the reentrant replacement function 'readdir_r'.
[src/folder.c:209]: (portability) Non reentrant function 'readdir' called. For threadsafe applications it is recommended to use the reentrant replacement function 'readdir_r'.
[src/folder.c:335]: (portability) Non reentrant function 'getpwuid' called. For threadsafe applications it is recommended to use the reentrant replacement function 'getpwuid_r'.
[src/hashes.c:718]: (error) Resource leak: fp
[src/hashes.c:819]: (error) Resource leak: fp
[src/hwmon.c:1236]: (style, inconclusive) Consecutive return, break, continue, goto or throw statements are unnecessary.
[src/hwmon.c:125]: (error) Resource leak: fd_cur
[src/hwmon.c:145]: (error) Resource leak: fd_max
[src/hwmon.c:249]: (error) Resource leak: fd
[src/interface.c:13449] -> [src/interface.c:13451]: (performance) Buffer 'tmp_buf' is being written before its old content has been used.
[src/interface.c:13538] -> [src/interface.c:13540]: (performance) Buffer 'tmp_buf' is being written before its old content has been used.
[src/interface.c:11773]: (style) The scope of the variable 'keyfile_len_pos' can be reduced.
[src/interface.c:11780]: (style) The scope of the variable 'contents_len_pos' can be reduced.
[src/interface.c:15504]: (style) The scope of the variable 'ptr_contents' can be reduced.
[src/interface.c:3530] -> [src/interface.c:3326]: (error) Array 'key_md4[2]' accessed at index 6, which is out of bounds.
[src/interface.c:3530] -> [src/interface.c:3321]: (error) Array 'key_des[2]' accessed at index 2, which is out of bounds.
[src/interface.c:3530] -> [src/interface.c:3322]: (error) Array 'key_des[2]' accessed at index 3, which is out of bounds.
[src/interface.c:3530] -> [src/interface.c:3323]: (error) Array 'key_des[2]' accessed at index 4, which is out of bounds.
[src/interface.c:3530] -> [src/interface.c:3324]: (error) Array 'key_des[2]' accessed at index 5, which is out of bounds.
[src/interface.c:3530] -> [src/interface.c:3325]: (error) Array 'key_des[2]' accessed at index 6, which is out of bounds.
[src/interface.c:3530] -> [src/interface.c:3326]: (error) Array 'key_des[2]' accessed at index 7, which is out of bounds.
[src/interface.c:3530] -> [src/interface.c:3330]: (error) Array 'key_des[2]' accessed at index 2, which is out of bounds.
[src/interface.c:3530] -> [src/interface.c:3331]: (error) Array 'key_des[2]' accessed at index 3, which is out of bounds.
[src/interface.c:3530] -> [src/interface.c:3332]: (error) Array 'key_des[2]' accessed at index 4, which is out of bounds.
[src/interface.c:3530] -> [src/interface.c:3333]: (error) Array 'key_des[2]' accessed at index 5, which is out of bounds.
[src/interface.c:3530] -> [src/interface.c:3334]: (error) Array 'key_des[2]' accessed at index 6, which is out of bounds.
[src/interface.c:3530] -> [src/interface.c:3335]: (error) Array 'key_des[2]' accessed at index 7, which is out of bounds.
[src/interface.c:12606]: (warning, inconclusive) The buffer 'w' may not be null-terminated after the call to strncpy().
[src/interface.c:4855]: (portability) Non reentrant function 'strtok' called. For threadsafe applications it is recommended to use the reentrant replacement function 'strtok_r'.
[src/interface.c:4865]: (portability) Non reentrant function 'strtok' called. For threadsafe applications it is recommended to use the reentrant replacement function 'strtok_r'.
[src/interface.c:4942]: (portability) Non reentrant function 'strtok' called. For threadsafe applications it is recommended to use the reentrant replacement function 'strtok_r'.
[src/interface.c:4952]: (portability) Non reentrant function 'strtok' called. For threadsafe applications it is recommended to use the reentrant replacement function 'strtok_r'.
[src/interface.c:20177]: (portability) Non reentrant function 'strtok' called. For threadsafe applications it is recommended to use the reentrant replacement function 'strtok_r'.
[src/interface.c:20185]: (portability) Non reentrant function 'strtok' called. For threadsafe applications it is recommended to use the reentrant replacement function 'strtok_r'.
[src/interface.c:14858]: (warning) %d in format string (no. 6) requires 'int' but the argument type is 'unsigned int'.
[src/interface.c:14896]: (warning) %d in format string (no. 6) requires 'int' but the argument type is 'unsigned int'.
[src/interface.c:14936]: (warning) %d in format string (no. 6) requires 'int' but the argument type is 'unsigned int'.
[src/interface.c:14981]: (warning) %d in format string (no. 6) requires 'int' but the argument type is 'unsigned int'.
[src/interface.c:15019]: (warning) %d in format string (no. 6) requires 'int' but the argument type is 'unsigned int'.
[src/interface.c:11774]: (style) The scope of the variable 'keyfile_len' can be reduced.
[src/interface.c:11781]: (style) The scope of the variable 'contents_len' can be reduced.
[src/interface.c:13209]: (style) The scope of the variable 'tt' can be reduced.
[src/interface.c:15503]: (style) The scope of the variable 'contents_len' can be reduced.
[src/mpsp.c:533]: (style) Variable 'donec' is assigned a value that is never used.
[src/mpsp.c:558]: (error) Resource leak: fp
[src/mpsp.c:1302]: (error) Resource leak: mask_fp
[src/mpsp.c:1360]: (error) Resource leak: mask_fp
[src/mpsp.c:1225]: (error) Resource leak: mask_fp
[src/mpsp.c:611]: (style) The scope of the variable 'k' can be reduced.
[src/opencl.c:1438] -> [src/opencl.c:1449]: (style) Variable 'CL_rc' is reassigned a value before the old one has been used.
[src/opencl.c:2222] -> [src/opencl.c:2228]: (style) Variable 'CL_rc' is reassigned a value before the old one has been used.
[src/opencl.c:2641]: (style, inconclusive) Boolean variable 'skipped' is used in bitwise operation. Did you mean '||'?
[src/opencl.c:2642]: (style, inconclusive) Boolean variable 'skipped' is used in bitwise operation. Did you mean '||'?
[src/opencl.c:179]: (portability) Non reentrant function 'strtok' called. For threadsafe applications it is recommended to use the reentrant replacement function 'strtok_r'.
[src/opencl.c:194]: (portability) Non reentrant function 'strtok' called. For threadsafe applications it is recommended to use the reentrant replacement function 'strtok_r'.
[src/opencl.c:216]: (portability) Non reentrant function 'strtok' called. For threadsafe applications it is recommended to use the reentrant replacement function 'strtok_r'.
[src/opencl.c:231]: (portability) Non reentrant function 'strtok' called. For threadsafe applications it is recommended to use the reentrant replacement function 'strtok_r'.
[src/opencl.c:253]: (portability) Non reentrant function 'strtok' called. For threadsafe applications it is recommended to use the reentrant replacement function 'strtok_r'.
[src/opencl.c:268]: (portability) Non reentrant function 'strtok' called. For threadsafe applications it is recommended to use the reentrant replacement function 'strtok_r'.
[src/opencl.c:1295]: (style) Obsolescent function 'usleep' called. It is recommended to use 'nanosleep' or 'setitimer' instead.
[src/opencl.c:1296]: (style) Obsolescent function 'usleep' called. It is recommended to use 'nanosleep' or 'setitimer' instead.
[src/opencl.c:1297]: (style) Obsolescent function 'usleep' called. It is recommended to use 'nanosleep' or 'setitimer' instead.
[src/opencl.c:295]: (error) Resource leak: fp
[src/opencl.c:2826] -> [src/opencl.c:2836]: (style) Variable 'amd_warn' is reassigned a value before the old one has been used.
[src/opencl.c:65]: (error) Resource leak: fd_drm
[src/opencl.c:67]: (error) Resource leak: fd_drm
[src/potfile.c:515] -> [src/potfile.c:524]: (warning) Either the condition 'if(found)' is redundant or there is possible null pointer dereference: found.
[src/potfile.c:516] -> [src/potfile.c:524]: (warning) Either the condition 'if(found)' is redundant or there is possible null pointer dereference: found.
[src/potfile.c:518] -> [src/potfile.c:524]: (warning) Either the condition 'if(found)' is redundant or there is possible null pointer dereference: found.
[src/potfile.c:520] -> [src/potfile.c:524]: (warning) Either the condition 'if(found)' is redundant or there is possible null pointer dereference: found.
[src/potfile.c:522] -> [src/potfile.c:524]: (warning) Either the condition 'if(found)' is redundant or there is possible null pointer dereference: found.
[src/potfile.c:428] -> [src/potfile.c:429]: (performance) Buffer 'line_buf_cpy' is being written before its old content has been used.
[include/sort_r.h:52]: (style) The scope of the variable 'tmp' can be reduced.
[include/sort_r.h:80]: (style) The scope of the variable 'ch' can be reduced.
[src/restore.c:86] -> [src/restore.c:89]: (style) Variable 'pidbin2_len' is reassigned a value before the old one has been used.
[src/restore.c:33]: (error) Resource leak: fp
[src/restore.c:184]: (error) Resource leak: fp
[src/restore.c:186]: (error) Resource leak: fp
[src/restore.c:50]: (style) The scope of the variable 'pidbin_len' can be reduced.
[src/rp.c:482]: (style) The scope of the variable 'rule_cmd' can be reduced.
[src/rp_cpu.c:66]: (style) The scope of the variable 'r' can be reduced.
[src/shared.c:131]: (style) Obsolescent function 'usleep' called. It is recommended to use 'nanosleep' or 'setitimer' instead.
[src/status.c:111]: (style) The scope of the variable 'units' can be reduced.
[src/status.c:887]: (portability) Non reentrant function 'gmtime' called. For threadsafe applications it is recommended to use the reentrant replacement function 'gmtime_r'.
[src/status.c:1002]: (portability) Non reentrant function 'gmtime' called. For threadsafe applications it is recommended to use the reentrant replacement function 'gmtime_r'.
[src/status.c:1028]: (portability) Non reentrant function 'gmtime' called. For threadsafe applications it is recommended to use the reentrant replacement function 'gmtime_r'.
[src/tuningdb.c:121]: (portability) Non reentrant function 'strtok' called. For threadsafe applications it is recommended to use the reentrant replacement function 'strtok_r'.
[src/tuningdb.c:127]: (portability) Non reentrant function 'strtok' called. For threadsafe applications it is recommended to use the reentrant replacement function 'strtok_r'.
[src/wordlist.c:204]: (style) The scope of the variable 'rule_buf_out' can be reduced.
[src/wordlist.c:357]: (style) The scope of the variable 'rule_buf_out' can be reduced.
[tools/rules_test/cpu_rules.c:90]: (style) The scope of the variable 'r' can be reduced.
(information) Cppcheck cannot find all the include files (use --check-config for details)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment