Skip to content

Instantly share code, notes, and snippets.

View kdopen's full-sized avatar

Keith Derrick kdopen

  • LG Electronics Silicon Valley Lab
  • Santa Clara, CA
View GitHub Profile
@kdopen
kdopen / safe_getline.c
Last active April 8, 2026 22:31
A "safe" getlne, written in C
#include <string.h>
#include <syslog.h>
#include <stdio.h>
#include <errno.h>
#include <limits.h>
#include "safe_getline.h"
/*
* Detects if explicit_bzero is available (glibc 2.25+).