Phone: + 1 507 4052 660

modify an existing c code application that violates several c code

 Fixing C code with Vulnerabilities
In this homework, you will modify an existing C code application that violates several C code rules and recommendations.  Your task is to locate the issues, based on the readings for this course, identify the rule(s) or recommendation(s) being violated and then fix the code. You will discuss each issue in terms of why the issue may cause a security vulnerability, and how you specifically fixed the issue.
Review and Understand the Sample C application.
The current code, developed by a junior developer, has several issues and is not functioning as expected. The desired functionality of the program is to allow a user to select from several choices on a menu. After the user selects the “Exit” option from the menu, the program will populate a password with ‘1’s and then display the value of the password. The program also captures a character so the screen can stay paused for review before exiting. Below are screen shots for a successful program execution.
Unfortunately, not only are there security issues, the code you were provided doesn’t work as expected. 
For the first part of this exercise demonstrate your C developer environment is working properly. You can do this by running any of the sample C code applications.
Modify the C code in this example to make the desired functionality work properly. Demonstrate the code works properly through screen captures and describing what changes were made to fix the functionality issues.
Carefully, review the code and perform analysis as needed. Consider the following rules and recommendations and hints for items that you might want to review. Note, that some rules and recommendations listed below may not be found as issues in the code. 
 STR31-C. Guarantee that storage for strings has sufficient space for character data and the null terminator.  MSC24-C. Do not use deprecated or obsolescent functions.  FIO34-C. Distinguish between characters read from a file and EOF or WEOF.  MSC17-C. Finish every set of statements associated with a case label with a break statement.   MSC33-C. Do not pass invalid data to the asctime() function.  MSC17-C. Finish every set of statements associated with a case label with a break statement.  DCL20-C. Explicitly specify void when a function accepts no arguments.  MEM30-C. Do not access freed memory.
You can use any C compiler you have access to including:
1. Windows C++ Express or Visual Studio
2. Mac X-Code C
3. Linux gcc
4. VM player with gcc (e.g. SDEV 300 Virtual machine)
Be sure you have a C environment where you can compile. Also review those code tutorial links provided in the classroom. Post a note, or contact your professor if you are having significant difficulties compiling a C program.
Once you have your environment working, reviewed and analyzed the code, and determined the rules and recommendations that are violated, you should fix the code. Be sure to document each issue by aligning the rule or recommendation and explain exactly how you fixed the issue.
a. Make sure your C coding environment is working first. Those C tutorials will help you to test your environment. b. Be very careful with the pointers and memory limits of the arrays. Most modern compilers attempt to protect your system resources, but you could potentially produce access violations that could lock your system up. Take your time and review the memory bounds for all of your arrays before you start making code changes c. Start on this early. This will take you longer than you think.
Provide your fixed C source code along with a PDF document describing how you addressed each issue. For example, you should list the C Cert rule or recommendation for each issue and show and
describe the code that addresses the issue. You should also provide screen shots and descriptions of the successful execution of the code. 
Be sure your PDF document is neat, well-organized and is well-written with minimal spelling and grammar errors. All references used should be included in your document.

Unlock Better Papers
Pages (550 words)
Approximate price: -

Why Hire a Professional Essay Writer from essayprohire

The quality of an essay is important

If you want to be successful in the essay writing world, it’s important to make sure that the quality of your work is high. A professional essay writer from us will be able to provide you with high-quality papers, and they will also have the experience necessary to write effective essays. This means that you won’t have to worry about any errors or problems with your essays – they will be perfect.

Our Customer service is top-notch

If you have a problem with your essay, or if you just need a little help writing it, then you should contact our customer service. Our customer service is always available to help you with whatever you need – from getting your essay correct to helping you with the grammar and punctuation. We’re here to help, so don’t hesitate to call us today!

Our offer on Unlimited Revisions

If you're looking for essaywriting help, then you should definitely consider getting help from a essaywritinghelpnow. However, if you're not sure what you need or whether you have the time or resources to do the research yourself, then you might want to consider getting unlimited revisions done by our team of experts. O

Our guarantee to Confidentiality

We understand the importance of confidentiality, and we will never share your personal information with anyone without your permission. That’s why we offer a one-year guarantee that your essays will remain confidential. If you decide that you no longer want us to write your essays, we will still respect your privacy and will destroy all the evidence that we had of your work.

Our Reliability

We believe that it is important to have a reliable and trustworthy essaywriter. That’s why we offer a 100% satisfaction guarantee on all of our essays. We take the time to get to know our clients, and we will always make sure that our essays are of the highest quality. We understand that not everyone is happy with their first essay, so we want to make sure that you’re always satisfied with the results of our work.

Our punctuality and quality

At our company, we pride ourselves on our punctuality and quality. We understand that it can be difficult to get essays written on time, and we’re here to help you out! Our writers are always available to help you with your essay, and we guarantee that you’ll receive the best possible product. We also have a strict no-nonsense policy when it comes to plagiarism, so you can be sure that your essay will be of the highest quality.


Try it now!

Calculate the price of your order

We'll send you the first draft for approval by at
Total price:

How it works?

Follow these simple steps to get your paper done

Place your order

Fill in the order form and provide all details of your assignment.

Proceed with the payment

Choose the payment system that suits you most.

Receive the final file

Once your paper is ready, we will email it to you.


Our Services

So much stress and so little time? Take care of yourself: let us help you with your tasks. We offer all kinds of writing services.


Custom Essay Writing Services

No matter what kind of academic paper you need and how urgent you need it, you are welcome to choose your academic level and the type of your paper at an affordable price. We take care of all your paper needs and give a 24/7 customer care support system.


Admission and Business Papers

An admission essay is an essay or other written statement by a candidate, often a potential student enrolling in a college, university, or graduate school. You can be rest assurred that through our service we will write the best admission essay for you.


Editing and Proofreading

Our academic writers and editors make the necessary changes to your paper so that it is polished. We also format your document by correctly quoting the sources and creating reference lists in the formats APA, Harvard, MLA, Chicago / Turabian.


Revision Support

If you think your paper could be improved, you can request a review. In this case, your paper will be checked by the writer or assigned to an editor. You can use this option as many times as you see fit. This is free because we want you to be completely satisfied with the service offered.