Coder Social home page Coder Social logo

Comments (5)

tehn avatar tehn commented on July 21, 2024

is udev not a requirement?

from libmonome.

simonvanderveldt avatar simonvanderveldt commented on July 21, 2024

is udev not a requirement?

@tehn AFAIK not, building libmonome will fall back to using sysfs if udev is missing.
I gathered this from #1 as well as

mandatory=False,
and @wrl's answer on #monome on IRC.

The above error is caused by the code for the sysfs implementation, that's why it only triggers when building without udev.

from libmonome.

tehn avatar tehn commented on July 21, 2024

ok. so should udev be required?

from libmonome.

simonvanderveldt avatar simonvanderveldt commented on July 21, 2024

ok. so should udev be required?

No, it doesn't have to be, sysfs alone can be enough.
I think I know how to fix this issue, will give it a try this weekend.

from libmonome.

simonvanderveldt avatar simonvanderveldt commented on July 21, 2024

Whilst for some reason I'm currently no longer able to reproduce this issue we should fix the asprintf warning because it opens the door to vulnerabilities. For some more info see here https://web.archive.org/web/20090505140305/http://blogs.23.nu:80/ilja/2006/10/antville-12995/

@wrl I think this would be the patch, does this look right?
I'm not sure if buf being NULL could cause any issues elsewhere in the code?

        path = strchr(path, '/') + 1;
 
-       asprintf(&buf, FTDI_PATH "/*/%s", path);
+  if (asprintf(&buf, FTDI_PATH "/*/%s", path) < 0) {
+         goto err_asprintf;
+  }
        glob(buf, 0, NULL, &gb);
        free(buf);
...
+ err_asprintf:
+	free(buf);

from libmonome.

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.