From 75521b27cd7e0f37b1832ca4dac62dd389eb11aa Mon Sep 17 00:00:00 2001 From: ru Date: Mon, 21 Feb 2000 10:22:39 +0000 Subject: Fix a buffer overflow. PR: 16415 Submitted by: Kevin Day Approved by: jkh --- usr.sbin/procctl/procctl.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'usr.sbin/procctl') diff --git a/usr.sbin/procctl/procctl.c b/usr.sbin/procctl/procctl.c index fb4d5df..574523f 100644 --- a/usr.sbin/procctl/procctl.c +++ b/usr.sbin/procctl/procctl.c @@ -1,5 +1,5 @@ /* - * Copryight 1997 Sean Eric Fagan + * Copyright 1997 Sean Eric Fagan * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -63,7 +63,7 @@ main(int ac, char **av) { for (i = 1; i < ac; i++) { char buf[32]; - sprintf(buf, "/proc/%s/mem", av[i]); + snprintf(buf, sizeof(buf), "/proc/%s/mem", av[i]); fd = open(buf, O_RDWR); if (fd == -1) { if (errno == ENOENT) -- cgit v1.1