Coder Social home page Coder Social logo

Comments (7)

devnev avatar devnev commented on May 27, 2024

Wow... I don't even... blarg?

from libxdg-basedir.

tweerwag avatar tweerwag commented on May 27, 2024

Just look at the code more carefully. It clears memory until n wraps around and becomes negative... You probably want something like

static void xdgZeroMemory(void* p, int n)
{
    for (; n > 0; n--)
        ((char*)p)[n] = 0;
}

from libxdg-basedir.

ILMostro avatar ILMostro commented on May 27, 2024

I doubt this is legit; i.e. not what people expect to be like the libxdg-basedir from n.ethz.ch... Though, I wish it was

from libxdg-basedir.

tweerwag avatar tweerwag commented on May 27, 2024

Huh? What are you referring to with this? This issue? My suggestion? This whole repository?

from libxdg-basedir.

davmac314 avatar davmac314 commented on May 27, 2024

@tweerwag your suggested fix is incorrect. Consider the simple case of xdgZeroMemory(p, 1) - it should only set p[0] = 0, instead it will set p[1] = 0 (and will not set p[0] = 0). I have a correct fix in my fork.

from libxdg-basedir.

tweerwag avatar tweerwag commented on May 27, 2024

Oops... Good to hear someone is picking up maintaining!

from libxdg-basedir.

ILMostro avatar ILMostro commented on May 27, 2024

Yeah, sorry for the noise there. IIRC, I had been trying to find a recent version of the codebase and wasn't sure if this repo was dead, active, separate from the original... Thank you

from libxdg-basedir.

Related Issues (5)

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.