3571e53040
patches for easier mirroring, to eliminate a special copy, to make www.freebsd.org/security a full copy of security.freebsd.org and be eventually be the same. For now files are just sitting there. The symlinks are missing. Discussed on: www (repository location) Discussed with: simon (so)
26 lines
904 B
Diff
26 lines
904 B
Diff
Index: sys/dev/syscons/syscons.c
|
|
===================================================================
|
|
RCS file: /home/ncvs/src/sys/dev/syscons/syscons.c,v
|
|
retrieving revision 1.409
|
|
diff -u -r1.409 syscons.c
|
|
--- sys/dev/syscons/syscons.c 29 Oct 2003 20:48:13 -0000 1.409
|
|
+++ sys/dev/syscons/syscons.c 4 Oct 2004 16:41:41 -0000
|
|
@@ -855,14 +855,16 @@
|
|
scrshot_t *ptr = (scrshot_t *)data;
|
|
void *outp = ptr->buf;
|
|
|
|
+ if (ptr->x < 0 || ptr->y < 0 || ptr->xsize < 0 || ptr->ysize < 0)
|
|
+ return EINVAL;
|
|
s = spltty();
|
|
if (ISGRAPHSC(scp)) {
|
|
splx(s);
|
|
return EOPNOTSUPP;
|
|
}
|
|
hist_rsz = (scp->history != NULL) ? scp->history->vtb_rows : 0;
|
|
- if ((ptr->x + ptr->xsize) > scp->xsize ||
|
|
- (ptr->y + ptr->ysize) > (scp->ysize + hist_rsz)) {
|
|
+ if (((u_int)ptr->x + ptr->xsize) > scp->xsize ||
|
|
+ ((u_int)ptr->y + ptr->ysize) > (scp->ysize + hist_rsz)) {
|
|
splx(s);
|
|
return EINVAL;
|
|
}
|