Wireshark
4.5.0
The Wireshark network protocol analyzer
Toggle main menu visibility
Main Page
Related Pages
Topics
Namespaces
Namespace List
Namespace Members
All
Variables
Classes
Class List
Class Index
Class Hierarchy
Class Members
All
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Functions
a
b
c
d
e
f
g
h
i
m
o
p
r
s
t
u
v
w
Variables
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Enumerations
Files
File List
File Members
All
_
a
b
c
d
e
f
g
h
i
j
l
m
n
o
p
q
r
s
t
u
v
w
x
Functions
a
b
c
d
e
f
g
h
i
j
l
m
n
o
p
q
r
s
t
u
v
w
x
Variables
Typedefs
a
b
c
d
e
f
g
h
i
m
p
r
s
t
u
v
w
Enumerations
Enumerator
a
b
c
e
f
h
i
n
o
r
s
t
w
Macros
_
a
b
c
d
e
f
g
h
i
j
l
m
n
o
p
r
s
t
u
v
w
x
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Macros
Modules
Pages
Loading...
Searching...
No Matches
wsutil
safe-math.h
1
/* Overflow-safe math helper macros
2
*
3
* To the extent possible under law, the authors have waived all
4
* copyright and related or neighboring rights to this code. For
5
* details, see the Creative Commons Zero 1.0 Universal license at
6
* https://creativecommons.org/publicdomain/zero/1.0/
7
*/
8
9
#pragma once
10
11
#include <setjmp.h>
12
13
#define ws_safe_op_jmp(op, res, a, b, env) \
14
do { \
15
if(ckd_##op(res, a, b)) { \
16
longjmp(env, 1); \
17
} \
18
} while (0)
19
20
#define ws_safe_add_jmp(res, a, b, env) ws_safe_op_jmp(add, res, a, b, env)
21
#define ws_safe_sub_jmp(res, a, b, env) ws_safe_op_jmp(sub, res, a, b, env)
22
#define ws_safe_mul_jmp(res, a, b, env) ws_safe_op_jmp(mul, res, a, b, env)
Generated by
1.9.8