Validating Untrusted Integer Inputs

Submitted By: shantanugoel
Rating: starstarhalf star (Rate It)
Share: Share By Email By Email

Visit


Description

If you are writing a software which exposes APIs to be used by a third party, then first thing you have to do is to make sure that all the integers parameters have been validated. Every incoming value to your function should be considered as tainted. The function should validate the input value by checking it for all possible malicious value.

Comments (2)

Why use untrusted integers in the first place? star   Posted by: Lundin on Tuesday, September 08, 2009

The big issue in the original code show is the use of the "int" type, rather than a user-defined deterministic type such as uint32_t.

And why use malloc() in a C++ program?

ongling starstarstarstar   Posted by: ongling on Wednesday, November 23, 2011

www.ongling.com

Add Your Rating

(Not published)
star
starstar
starstarstar
starstarstarstar
starstarstarstarstar
 

Recent Jobs

Official Programmer's Heaven Blogs
Web Hosting | Browser and Social Games | Gadgets

Popular resources on Programmersheaven.com
Assembly | Basic | C | C# | C++ | Delphi | Flash | Java | JavaScript | Pascal | Perl | PHP | Python | Ruby | Visual Basic
© Copyright 2011 Programmersheaven.com - All rights reserved.
Reproduction in whole or in part, in any form or medium without express written permission is prohibited.
Violators of this policy may be subject to legal action. Please read our Terms Of Use and Privacy Statement for more information.
Operated by CommunityHeaven, a BootstrapLabs company.