doc/website/static/security/patches/SA-05:07/ldt5.patch
Sergio Carlavilla Delgado 989d921f5d Migrate doc to Hugo/AsciiDoctor
I'm very pleased to announce the release of
our new website and documentation using
the new toolchain with Hugo and AsciiDoctor.

To get more information about the new toolchain
please read the FreeBSD Documentation Project Primer[1],
Hugo docs[2] and AsciiDoctor docs[3].

Acknowledgment:
Benedict Reuschling <bcr@>
Glen Barber <gjb@>
Hiroki Sato <hrs@>
Li-Wen Hsu <lwhsu@>
Sean Chittenden <seanc@>
The FreeBSD Foundation

[1] https://docs.FreeBSD.org/en/books/fdp-primer/
[2] https://gohugo.io/documentation/
[3] https://docs.asciidoctor.org/home/

Approved by:    doceng, core
2021-01-26 00:31:29 +01:00

30 lines
990 B
Diff

Index: sys/i386/i386/sys_machdep.c
===================================================================
RCS file: /home/ncvs/src/sys/i386/i386/sys_machdep.c,v
retrieving revision 1.100
diff -u -p -r1.100 sys_machdep.c
--- sys/i386/i386/sys_machdep.c 19 Apr 2005 13:52:27 -0000 1.100
+++ sys/i386/i386/sys_machdep.c 4 May 2005 00:39:36 -0000
@@ -476,10 +476,6 @@ i386_get_ldt(td, uap)
uap->start, uap->num, (void *)uap->descs);
#endif
- /* verify range of LDTs exist */
- if ((uap->start < 0) || (uap->num <= 0))
- return(EINVAL);
-
if (pldt) {
nldt = pldt->ldt_len;
num = min(uap->num, nldt);
@@ -489,7 +485,10 @@ i386_get_ldt(td, uap)
num = min(uap->num, nldt);
lp = &ldt[uap->start];
}
- if (uap->start + num > nldt)
+
+ if ((uap->start > (unsigned int)nldt) ||
+ ((unsigned int)num > (unsigned int)nldt) ||
+ ((unsigned int)(uap->start + num) > (unsigned int)nldt))
return(EINVAL);
error = copyout(lp, uap->descs, num * sizeof(union descriptor));