Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (Cyborg)
  • No Skin
Collapse
Brand Logo

CIRCLE WITH A DOT

  1. Home
  2. Uncategorized
  3. Fun to see the Linux kernel follow in #curl's footsteps!

Fun to see the Linux kernel follow in #curl's footsteps!

Scheduled Pinned Locked Moved Uncategorized
curl
5 Posts 4 Posters 0 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • bagder@mastodon.socialB This user is from outside of this forum
    bagder@mastodon.socialB This user is from outside of this forum
    bagder@mastodon.social
    wrote last edited by
    #1

    RE: https://hachyderm.io/@kees/116282745861595200

    Fun to see the Linux kernel follow in #curl's footsteps! 😎 (we removed the last strncpy from curl in late 2025)

    zsteva@mastodon.socialZ lovestha@floss.socialL kasperd@westergaard.socialK 3 Replies Last reply
    1
    0
    • bagder@mastodon.socialB bagder@mastodon.social

      RE: https://hachyderm.io/@kees/116282745861595200

      Fun to see the Linux kernel follow in #curl's footsteps! 😎 (we removed the last strncpy from curl in late 2025)

      zsteva@mastodon.socialZ This user is from outside of this forum
      zsteva@mastodon.socialZ This user is from outside of this forum
      zsteva@mastodon.social
      wrote last edited by
      #2

      @bagder Long time ago, there was small project called qmail in C, author started project by rethinging/replacing almost every standard C function.

      1 Reply Last reply
      0
      • bagder@mastodon.socialB bagder@mastodon.social

        RE: https://hachyderm.io/@kees/116282745861595200

        Fun to see the Linux kernel follow in #curl's footsteps! 😎 (we removed the last strncpy from curl in late 2025)

        lovestha@floss.socialL This user is from outside of this forum
        lovestha@floss.socialL This user is from outside of this forum
        lovestha@floss.social
        wrote last edited by
        #3

        @bagder so some time around 2040 we'll have 99% of things using a kernel without it.

        My snark comes from two months of broken audio stack on my android phone that was a unterminated string issue.

        1 Reply Last reply
        0
        • R relay@relay.an.exchange shared this topic
        • bagder@mastodon.socialB bagder@mastodon.social

          RE: https://hachyderm.io/@kees/116282745861595200

          Fun to see the Linux kernel follow in #curl's footsteps! 😎 (we removed the last strncpy from curl in late 2025)

          kasperd@westergaard.socialK This user is from outside of this forum
          kasperd@westergaard.socialK This user is from outside of this forum
          kasperd@westergaard.social
          wrote last edited by
          #4

          Do I understand correctly that the problem with strncpy is that after the call you don't know if the buffer is NUL terminated or not?

          bagder@mastodon.socialB 1 Reply Last reply
          0
          • kasperd@westergaard.socialK kasperd@westergaard.social

            Do I understand correctly that the problem with strncpy is that after the call you don't know if the buffer is NUL terminated or not?

            bagder@mastodon.socialB This user is from outside of this forum
            bagder@mastodon.socialB This user is from outside of this forum
            bagder@mastodon.social
            wrote last edited by
            #5

            @kasperd yes. but we also find that code generally improves using other solutions so in curl we don't replace it with something that guarantees a null terminator. We write the code another way instead.

            1 Reply Last reply
            1
            0
            • R relay@relay.infosec.exchange shared this topic
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            • Login

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • World
            • Users
            • Groups