|
|
Subscribe / Log in / New account

Google's effort to mitigate memory-safety issues

Google's effort to mitigate memory-safety issues

Posted Feb 18, 2021 17:23 UTC (Thu) by gerdesj (subscriber, #5446)
Parent article: Google's effort to mitigate memory-safety issues

What about stopping curl piping direct to BASH (it's always BASH)? 8)


to post comments

Google's effort to mitigate memory-safety issues

Posted Feb 18, 2021 20:49 UTC (Thu) by mathstuf (subscriber, #69389) [Link] (3 responses)

Because POSIX-compatible shell is harder to write than bash. I try to and yet bash-isms still leak in time to time.

Google's effort to mitigate memory-safety issues

Posted Feb 22, 2021 10:09 UTC (Mon) by tao (subscriber, #17563) [Link] (2 responses)

Personally I've found that at the point where I'd need bash:isms it's typically time to switch to python.
A good way to avoid bash:isms leaking in is to link /bin/sh to /bin/dash and use #! /bin/sh instead of #! /bin/bash...

Google's effort to mitigate memory-safety issues

Posted Feb 22, 2021 13:51 UTC (Mon) by mathstuf (subscriber, #69389) [Link] (1 responses)

It's not about needing them. It's about accidentally using them. Personally I use ShellCheck to guide me for anything that isn't one-off.

Google's effort to mitigate memory-safety issues

Posted Feb 23, 2021 12:17 UTC (Tue) by abo (subscriber, #77288) [Link]

Or, you know, just write for bash and put /bin/bash at the top. It's simple, honest and usually not a problem, and if it is a problem then it's likely someone else's problem!


Copyright © 2025, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds