Skip to content

Commit

Permalink
Fix buffer overrun (off by one). PR port-atari/42717
Browse files Browse the repository at this point in the history
  • Loading branch information
tsutsui committed Jun 30, 2012
1 parent 587bf3f commit ec92b56
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions sys/arch/atari/dev/clock.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* $NetBSD: clock.c,v 1.53 2011/06/05 06:33:42 tsutsui Exp $ */
/* $NetBSD: clock.c,v 1.54 2012/06/30 12:42:37 tsutsui Exp $ */

/*
* Copyright (c) 1988 University of Utah.
Expand Down Expand Up @@ -39,7 +39,7 @@
*/

#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: clock.c,v 1.53 2011/06/05 06:33:42 tsutsui Exp $");
__KERNEL_RCSID(0, "$NetBSD: clock.c,v 1.54 2012/06/30 12:42:37 tsutsui Exp $");

#include <sys/param.h>
#include <sys/kernel.h>
Expand Down Expand Up @@ -505,7 +505,7 @@ rtcread(dev_t dev, struct uio *uio, int flags)
struct clock_softc *sc;
mc_todregs clkregs;
int s, length;
char buffer[16];
char buffer[16 + 1];

sc = device_lookup_private(&clock_cd, minor(dev));

Expand Down

0 comments on commit ec92b56

Please sign in to comment.