Git Product home page Git Product logo

elfread's Introduction

elfread

display information about ELF files


Donate

  • 100% of the proceeds that wind up in these accounts will be donated to animal shelters.
  • BITCOIN: bc1qc0x6qdsk7auhsrym6vz0rtafnl2qgqjk7yy3tn
  • ETHEREUM: 0x482d85E39Ce865Dcf7c26bFDD6e52AB203d0f555
  • DOGECOIN: DPYxWnnyYzmPYWP92iqo4DizJht3rZnYnu
  • LITECOIN: ltc1qea6ehaanwr9q3jygmw75q35avk8t74h7sc5uc3
  • ETHCLASSIC: 0x6C63D4428Cb6BfDB7AC72b447A8B29D811395052
  • ADA: addr1qxn4przua2crcrgwt3pk5465ym3syytfn2v7gssu7ayuvpvefqwdvkgzn4y3j5d5ynsh03kae9k8d0z8yuh8excuv6xqdl4kyt

elfread's People

Contributors

7etsuo avatar thesc1entist avatar

Stargazers

 avatar  avatar

Watchers

 avatar

elfread's Issues

elfread crashing when long options not recgonized

spl0its-r-us)-[/code/Projects/elfread]
โ””โ”€$ valgrind -s ./elfread --file .elfread
==176056== Memcheck, a memory error detector
==176056== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al.
==176056== Using Valgrind-3.18.1 and LibVEX; rerun with -h for copyright info
==176056== Command: ./elfread --file .elfread
==176056==
==176056== Invalid read of size 1
==176056== at 0x483FEE0: strncmp (vg_replace_strmem.c:709)
==176056== by 0x4948AA0: process_long_option (getopt.c:212)
==176056== by 0x494943E: _getopt_internal_r (getopt.c:650)
==176056== by 0x49496A0: _getopt_internal (getopt.c:711)
==176056== by 0x494971D: getopt_long (getopt1.c:31)
==176056== by 0x10B2C4: main (in /code/Projects/elfread/elfread)
==176056== Address 0x1 is not stack'd, malloc'd or (recently) free'd
==176056==
==176056==
==176056== Process terminating with default action of signal 11 (SIGSEGV)
==176056== Access not within mapped region at address 0x1
==176056== at 0x483FEE0: strncmp (vg_replace_strmem.c:709)
==176056== by 0x4948AA0: process_long_option (getopt.c:212)
==176056== by 0x494943E: _getopt_internal_r (getopt.c:650)
==176056== by 0x49496A0: _getopt_internal (getopt.c:711)
==176056== by 0x494971D: getopt_long (getopt1.c:31)
==176056== by 0x10B2C4: main (in /code/Projects/elfread/elfread)
==176056== If you believe this happened as a result of a stack
==176056== overflow in your program's main thread (unlikely but
==176056== possible), you can try to increase the size of the
==176056== main thread stack using the --main-stacksize= flag.
==176056== The main thread stack size used in this run was 8388608.
==176056==
==176056== HEAP SUMMARY:
==176056== in use at exit: 0 bytes in 0 blocks
==176056== total heap usage: 0 allocs, 0 frees, 0 bytes allocated
==176056==
==176056== All heap blocks were freed -- no leaks are possible
==176056==
==176056== ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 0 from 0)
==176056==
==176056== 1 errors in context 1 of 1:
==176056== Invalid read of size 1
==176056== at 0x483FEE0: strncmp (vg_replace_strmem.c:709)
==176056== by 0x4948AA0: process_long_option (getopt.c:212)
==176056== by 0x494943E: _getopt_internal_r (getopt.c:650)
==176056== by 0x49496A0: _getopt_internal (getopt.c:711)
==176056== by 0x494971D: getopt_long (getopt1.c:31)
==176056== by 0x10B2C4: main (in /code/Projects/elfread/elfread)
==176056== Address 0x1 is not stack'd, malloc'd or (recently) free'd
==176056==
==176056== ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 0 from 0)
zsh: segmentation fault valgrind -s ./elfread --file .elfread

Fix toctou vulnerability

if ((stat(filename, &sb) == -1) || S_ISDIR(sb.st_mode))

Calling stat() before locking the file with fopen() is a security issue. Use fopen() first to lock the file then use fstat() instead of stat().

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.