Deleted Added
full compact
nlist.c (8870) nlist.c (11659)
1/*
2 * Copyright (c) 1989, 1993
3 * The Regents of the University of California. All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 59 unchanged lines hidden (view full) ---

68 register int fd;
69 register struct nlist *list;
70{
71 register struct nlist *p, *symtab;
72 register caddr_t strtab, a_out_mmap;
73 register off_t stroff, symoff;
74 register u_long symsize;
75 register int nent;
1/*
2 * Copyright (c) 1989, 1993
3 * The Regents of the University of California. All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 59 unchanged lines hidden (view full) ---

68 register int fd;
69 register struct nlist *list;
70{
71 register struct nlist *p, *symtab;
72 register caddr_t strtab, a_out_mmap;
73 register off_t stroff, symoff;
74 register u_long symsize;
75 register int nent;
76 size_t strsize;
77 struct nlist nbuf[1024];
78 struct exec * exec;
79 struct stat st;
80
81 /* check that file is at least as large as struct exec! */
82 if ((fstat(fd, &st) < 0) || (st.st_size < sizeof(struct exec)))
83 return (-1);
84
85 /* Check for files too large to mmap. */

--- 75 unchanged lines hidden ---
76 struct exec * exec;
77 struct stat st;
78
79 /* check that file is at least as large as struct exec! */
80 if ((fstat(fd, &st) < 0) || (st.st_size < sizeof(struct exec)))
81 return (-1);
82
83 /* Check for files too large to mmap. */

--- 75 unchanged lines hidden ---