Загрузка...

Lecture 3 - Integer Overflow

In Rust, integer overflows and underflows can occur when a calculation produces a result that is too large or small to be stored in the data type, leading to severe logical errors in the program. As a developer or security auditor, it's essential to understand these issues and how to prevent them in Rust programs. In this video, we'll explore the techniques and best practices for preventing integer overflows and underflows in Rust, tailored to both developers and security auditors. We'll cover: - What are integer overflows and underflows and how they occur in Rust programs - How integer overflows and underflows can lead to security vulnerabilities and how to identify them in code during security audits - How to enable overflow checks in cargo.toml to catch integer overflows - The use of checked math functions like checked_add, checked_sub, checked_mul, and checked_div to prevent overflows and underflows. - The use of saturating math functions like saturating_add, saturating_sub, saturating_mul, and saturating_div to prevent overflows and underflows - Examples of how to use these techniques in Rust programs to prevent integer overflows and underflows, including how to handle the option type returned by checked math functions and how to use saturating math functions to gracefully handle overflows and underflows By the end of this video, you'll have a solid understanding of integer overflows and underflows in Rust and be equipped with the knowledge to prevent them using a variety of techniques and best practices, whether you're a developer or security auditor. You'll also be able to identify and prevent security vulnerabilities related to integer overflows and underflows in Rust programs, making your code more secure and reliable. Code and slide deck : https://github.com/timurguvenkaya/near-sc-security-course Watch the NEAR Rust Smart Contract Security course: https://youtube.com/playlist?list=PL7Gwuo_MOL740lhKTvouCJvk4sAyuqZqT Follow me on Twitter: https://twitter.com/timurguvenkaya Lenster: https://lenster.xyz/u/timurguvenkaya Linkedin: https://www.linkedin.com/in/timur-guvenkaya/ Github: https://github.com/timurguvenkaya

Видео Lecture 3 - Integer Overflow автора Питоновый старт для начинающих
Страницу в закладки Мои закладки
Все заметки Новая заметка Страницу в заметки