File: stack-smashing.c

package info (click to toggle)
gcc-sh-elf 8.3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 140 kB
  • sloc: ansic: 237; makefile: 93; sh: 54
file content (13 lines) | stat: -rw-r--r-- 331 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
/* SPDX-FileCopyrightText: 2021 John Scott <jscott@posteo.net>
 * SPDX-License-Identifier: GPL-3.0-or-later */
#define _POSIX_C_SOURCE 200809L
#include <stdio.h>
#include <string.h>

int main(void) {
	char arr[1];
	strcpy(arr, "supercalifragilisticexpialidocious");
	if(puts(arr) == EOF) {
		perror("Failed to print string");
	}
}