Safe arrays and pointers in c

  • Unique Paper ID: 142911
  • Volume: 2
  • Issue: 7
  • PageNo: 204-206
  • Abstract:
  • Buffer overflows continue to plague C and C++ programs. This is a draft proposal for dealing with that problem. The basis of this proposal is to define means for expressing the size of arrays in C. C already has fixed-size arrays with useful semantics. In this proposal, the existing syntax for fixed-length arrays is generalized to allow known-length arrays, where the length of the array is determined at variable initialization time. With relatively minor and compatible changes to C, the most troublesome causes of program crashes and security vulnerabilities can be dealt with. In any useful program, each array has a size known to the programmer. In C, there is currently no way to consistently express that size in the language. This proposal adds that capability.
email to a friend

Cite This Article

  • ISSN: 2349-6002
  • Volume: 2
  • Issue: 7
  • PageNo: 204-206

Safe arrays and pointers in c

Related Articles