Identify the type of software flaws

Assignment Help C/C++ Programming
Reference no: EM133851942

Question: For each of the code fragments below, identify the type of software flaw(s) found and suggest a way to fix the issue(s). It is recommended that you identify the problem without using a computer. After identifying the problem, you may use a computer to verify your answer.

Code Fragment #1
void sampleFunc(char inStr[])
{
char buf[10];
buf[9]='\0';
strcpy(buf,inStr);
cout<<"\n"<<buf<<"\n";
return;
}

Code Fragment #2
Using Code Fragment #1, carry out research on banned function calls and rewrite the code using an equivalent, but secure, function from the Safe C Runtime Library.

Code Fragment #3

Enable Code Fragment #1 to be able to throw an exception to handle the excessive string length issue. Also, add a main function with an exception handling mechanism that will handle the exception that is thrown. Get expert online assignment help in the USA now!

Submit a 2- to 3-page paper in APA format that contains the original code fragment, a description of the coding flaw in each, and your proposed solution using defensive programming technique(s) to fix it.

Your document should be 2-3 pages long (not including the list of references and cover page), but it is the quality of the work that is important, not the number of pages. Cite and reference all sources using APA format and style guidelines and submit in a single document.

Reference no: EM133851942

Questions Cloud

Global trends and individual dynamics : Demonstrate a comprehensive understanding of these topics and their interconnections in the modern workplace - you will explore key aspects of organizational
Create the initial steps of evidence-based practice project : You were asked to create the initial steps of an Evidence-Based Practice (EBP) project using your chosen topic and the articles your instructor approved.
G-power analysis for quality improvement : What is the benefit of G-power analysis for quality improvement? How G-power analysis help for the project for pain management and possible opioid
Patient is ready for discharge : A patient is ready for discharge when she spikes a fever of 101.3°F. A call to the physician results in an order for IV antibiotics to be administered
Identify the type of software flaws : Identify the type of software flaws found and suggest a way to fix the issue(s). It is recommended that you identify the problem without using a computer
How did assimilationist approaches to education manifest : According to the texts, how did assimilationist approaches to education manifest in schooling for Native Americans and immigrants?
About to begin anticholinergic medication therapy : Provider is assessing older adult male patient prior to beginning prescribed anticholinergic drug. A client is about to begin anticholinergic medication therapy
What is issue or problem that is impacting your community : What is the issue or problem that is impacting your community? Describe the issue or problem and its effects. Identify all of the government officials discussed
Contracted sexually transmitted infection : A 52-year-old female presents to your clinic concerned that she may have contracted a sexually transmitted infection

Reviews

Write a Review

C/C++ Programming Questions & Answers

  Create program that uses functions and reference parameters

Create program that uses functions and reference parameters, and asks user for the outside temperature.

  Write a program using vectors and iterators

Write a program using vectors and iterators that allows a user to maintain a personal list of DVD titles

  Write the code required to analyse and display the data

Calculate and store the average for each row and column. Determine and store the values for the Average Map.

  Write a webservices application

Write a webservices application that does a simple four function calculator

  Iimplement a client-server of the game

Iimplement a client-server version of the rock-paper-scissors-lizard-Spock game.

  Model-view-controller

Explain Model-View-Controller paradigm

  Design a nested program

How many levels of nesting are there in this design?

  Convert celsius temperatures to fahrenheit temperatures

Write a C++ program that converts Celsius Temperatures to Fahrenheit Temperatures.

  Evaluate and output the value in the given base

Write C program that will input two values from the user that are a Value and a Base with which you will evaluate and output the Value in the given Base.

  Design a base class shape with virtual functions

Design a base class shape with virtual functions

  Implementation of classes

Implementation of classes Chart and BarChart. Class barChart chould display a simple textual representation of the data

  Technical paper: memory management

Technical Paper: Memory Management, The intent of this paper is to provide you with an in depth knowledge of how memory is used in executing, your programs and its critical support for applications.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd