Testing & Security

Testing & Security

Testing & Security Dr. X Integer Error Integer Overflow/Underflow: Mathematical operations can increase integer values above the maximum or decrease them below the minimum allowed values. Truncation: If an integer is converted from a larger type to a smaller

type (say, from a long to a short), the value will be truncated if it is outside the range of the smaller type; data that can't fit will simply be thrown out. Avoiding Integer Error Know your bounds Validate your inputs!

Input Validation Think about inputs that can break this program Input Validation Check your input:

Type: data type. Range: Verify that numbers are within a range

Plausibility: Check that values make sense Presence check: Guarantee presence of important data Length: Input that is either too long or too short will not be legitimate Format: Dates, credit card numbers, and other data types have limitations on the number of digits and any other characters used for separation Checksums Use appropriate language tools

Recover Appropriately Buffer Overflow Buffer Overflow Avoiding Buffer Overflow Mind your indices!

Make sure you have enough space Use alternative data structures that reduce the risk of overflows Try to avoid allocating storage until you know how much you need Send the size of the array along with the array Avoid risky functions Use your tools Handle exceptions with care

Resources https:// www.owasp.org/index.php/OWASP_Secure_Coding_Practices_Checkl ist https://www.securecoding.cert.org/confluence/display/seccode /Top+10+Secure+Coding+Practices https://en.wikipedia.org/wiki/Secure_coding

Recently Viewed Presentations

  • Year Design 7 Product GCSE & Design Technology

    Year Design 7 Product GCSE & Design Technology

    To learn about metals. To give you a broader understanding of the materials used in everyday products. Part of your GCSE exams and materials that you might want to use for your future projects
  • State Innovation Model (SIM) Central Maine Healthcare Diabetes

    State Innovation Model (SIM) Central Maine Healthcare Diabetes

    Healthy Acadia. Pen Bay Healthcare. DFD Russell Medical Centers. Cary Medical Center. Home Health Visiting Nurses. St. Mary's Regional Medical Center/Bates. ... Weight loss. Key: 2013-14. n=28, n=4 (reported to DPRP March 2014) 2014-16. n=7 (reported to DPRP March 2016)...
  • POLITICS AND ETHICS OF EMERGING TECHNOSCIENCES : BT

    POLITICS AND ETHICS OF EMERGING TECHNOSCIENCES : BT

    -A large number of recombinant DNA medical products developed by using genetic engineering, such as vaccines, insulin, etc are being used to alleviate human suffering and provide medical relief to patients in millions worldwide. Many products developed as a result...
  • Communication - WordPress.com

    Communication - WordPress.com

    L'image que nous donnons doit être confirmée par autrui. Le fait que le rôle, le statut et la place des acteurs soient bien identifiés permet aux interlocuteurs de se reconnaître dans une position sociale, d'éviter les mal-entendus, les conflits, et...
  • 11.3 Surface Areas of Pyramids and Cones

    11.3 Surface Areas of Pyramids and Cones

    11.3 Surface Areas of Pyramids and Cones A pyramid is a polyhedron in which one face (the base) can be any polygon and the other faces (the lateral faces) are triangles that meet at a common vertex (called the vertex...
  • Routes into Languages in the East Midlands Student

    Routes into Languages in the East Midlands Student

    * * East Midlands consortium NTU is lead institution and works in partnership with University of Leicester, University of Loughborough, University of Nottingham, and De Montford (Leicester) A taste of the East Midlands: Focus on Widening Participation, intercultural understanding, employability...
  • CHAPTE R 2 Thinking Like An Economist Microeonomics

    CHAPTE R 2 Thinking Like An Economist Microeonomics

    * * This and the following slide build the Circular-Flow Diagram piece by piece. * * In this diagram, the green arrows represent flows of income/payments. The red arrows represent flows of goods & services (including services of the factors...
  • Porphyria's Lover - calhoun.k12.al.us

    Porphyria's Lover - calhoun.k12.al.us

    Porphyria's Lover by Robert Browning The rain set early in tonight, The sullen wind was soon awake, It tore the elm-tops down for spite, And did its worst to vex the lake: I listened with heart fit to break.