Skip to content

Integers

Razvan Deaconescu edited this page Jun 6, 2019 · 3 revisions

Integers

Integers are the fundamental data type in programming languages. Although aparently simple and harmless, improper integer handling cand lead to vulnerabilities. Issues such as integer overflows, casts, truncations, are causes of severe issues in modern applications.

In this chapter we look into integer handling in Java, common pitfalls and ways to mitigate them.

Concepts

integer representation: size, signature, 2's complement

basic integer data types in java

integer overflow, integer casts

arbitrary precision integers

floating point

Tasks

Print

Similar idea with NUM03.

Conversion

Similar idea with NUM12.

Overflow

Safe Operations

Based on NUM00.

Big Integers

C Issue

Follow instrutions here.

Floating Point

Big Decimal

Based on NUM10 and NUM11.

Integer-Floating Point Conversions

Based on NUM13 and NUM50.

Clone this wiki locally