/*
* Rule: STR31-C
* Source: wiki
* Status: FAIL - Should trigger STR31-C violation
*/
#include <stdlib.h>
#include <string.h>
void func(void) {
char buff[256];
char *editor = getenv("EDITOR");
if (editor == NULL) {
/* EDITOR environment variable not set */
} else {
strcpy(buff, editor);
}
}