Get the latest tech news

Writing C for Curl


It is a somewhat common question to me: how do we write C in curl to make it safe and secure for billions of installations? Some precautions we take and decisions we make. There is no silver bullet, just guidelines. As I think you can see for yourself below they are also neither strange nor … Continue reading Writing C for curl →

There are some C functions that are just plain bad because of their lack of boundary controls or local state and we avoid them (gets, sprintf, strcat, strtok, localtime, etc). Lastly, it steers users into copying parsed results around unnecessarily, leading to superfluous uses of local stack buffers or short-lived heap allocations. Thanks to the process of human reviewers, plenty of automatic tools and an elaborate and extensive test suite, everyone can (attempt to) write curl code.

Get the Android app

Or read this on Hacker News

Read more on:

Photo of curl

curl

Related news:

News photo

Curl-impersonate: Special build of curl that can impersonate the major browsers

News photo

HTTPS RR in Curl

News photo

cURL 8.12 Released With Its Rust Hyper Backend Removed