diff options
author | Guy Harris <guy@alum.mit.edu> | 2018-04-25 19:04:40 -0700 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2018-04-25 19:04:40 -0700 |
commit | 9bac75ac0222df31e29ecacf2da423702b3e5c3d (patch) | |
tree | 5e5821c2af3f1ccd3ce07f41186ba95ab5bef17d /optimize.h | |
parent | 711c82a52e7494be0b52148d2ad3eb8c51d9abdc (diff) |
Do bounds checking on references to the bids array.
Addresses GitHub issue #484.
Diffstat (limited to 'optimize.h')
-rw-r--r-- | optimize.h | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/optimize.h b/optimize.h new file mode 100644 index 00000000..d8f646c8 --- /dev/null +++ b/optimize.h @@ -0,0 +1,30 @@ +/* + * Copyright (c) 1990, 1991, 1992, 1993, 1994, 1995, 1996 + * The Regents of the University of California. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that: (1) source code distributions + * retain the above copyright notice and this paragraph in its entirety, (2) + * distributions including binary code include the above copyright notice and + * this paragraph in its entirety in the documentation or other materials + * provided with the distribution, and (3) all advertising materials mentioning + * features or use of this software display the following acknowledgement: + * ``This product includes software developed by the University of California, + * Lawrence Berkeley Laboratory and its contributors.'' Neither the name of + * the University nor the names of its contributors may be used to endorse + * or promote products derived from this software without specific prior + * written permission. + * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + */ + +/* + * Some stuff for use when debugging the optimizer. + */ +#ifdef BDEBUG +extern int pcap_optimizer_debug; /* optimizer debugging level */ + +#define NBIDS 1000 +extern int bids[NBIDS]; +#endif |