GithubHelp home page GithubHelp logo

Comments (3)

smortex avatar smortex commented on August 22, 2024

If we consider that malloc never fails and that these abort() are only safekeepers, I would be okay to integrate a pull-request that handle this without aborting, but doing this would be at the lowest priority…

Please open a pull-request if you have a patch that fixes this issue for you.

from libfreefare.

clausecker avatar clausecker commented on August 22, 2024

First of all, you handle failure to malloc() in all other places in the code, just not here. Why do you deviate from your perfectly fine error handling just in this one place? Second, the answer you linked is wrong and dangerous. It's pretty easy to get malloc() on Linux to fail, contrary to what this answer says. Also, Linux is not the only operating system in the world and malloc() may fail much more likely on other operating systems.

If you are unable to fix this issue on your own, I can write a patch for you, but you should really fix your own issues.

from libfreefare.

smortex avatar smortex commented on August 22, 2024

you handle failure to malloc() in all other places in the code, just not here

The code has been written in multiple shots over a long period of time, and while I agree with you that failing gracfuly is ways better than aborting, and consistency accross the code base would be better, the value of such a change is currently low from my point of view (I am not affected by this problem and there are other topics in the nfc-tools which are more important to fix before this kind of problems).

If you are unable to fix this issue on your own, I can write a patch for you, but you should really fix your own issues.

As I said, this is at the lowest priority. I would be happy to merge a pull request that fixes this if you can offer one, or will work on this if somebody can pay for this, but I can't offer another solution ATM due to time.

So, our possibilities are:

  1. If we receive a pull-request referencing this issue, it will be merged;
  2. If more people 👍 this issue, we will reopen it and reconsider this;
  3. If none of the above happen, it is unlikelly to change, sorry.

Thanks!

from libfreefare.

Related Issues (20)

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.