Giter Club home page Giter Club logo

Comments (5)

loreb avatar loreb commented on June 12, 2024

Hope you didn't take it the wrong way and please please please keep working on security.md!

from c-style.

mcinglis avatar mcinglis commented on June 12, 2024

Hey - thanks very much for your comments.

Because they're unfinished, I've moved the security notes into the feature/security branch.

I also updated the notes a bit to reflect what you and your links say (I agree; the Annex K functions rock!).

https://github.com/mcinglis/c-style/blob/feature/security/security.md

It would be cool to hear your thoughts on these new recommendations. C string handling is so hard :)

from c-style.

loreb avatar loreb commented on June 12, 2024

Looks ok, and prompted me to check -- I have eglibc, musl and dietlibc installed, and none of them have strcpy_s and friends :(
Btw, about strings: there's a document (+ two libraries + thorough review of other libraries) arguing a radically different approach at http://www.and.org/vstr/security; I'm glad I've never found myself needing to go to these extremes but I've always found it some of the best read on the subject.

from c-style.

loreb avatar loreb commented on June 12, 2024

Unrelated: typo in "%.20x" -- should be a string

from c-style.

loreb avatar loreb commented on June 12, 2024

Unrelated(2): copy_string should return size_t, as at least on x86_64 they have a different size (I can't imagine someone copying strings that big, but even djb fell into that, see http://www.guninski.com/where_do_you_want_billg_to_go_today_4.html).
To be fair, I didn't notice that as well -- I just tried to compile your examples and got these two warnings from clang :)

from c-style.

Related Issues (7)

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.