Questions tagged [tr24731]

TR 24731 is a technical report prepared by the ISO C standardization committee, now partially incorporated as optional Annex K in the ISO/IEC 9899:2011 C Standard. Part 1 standardizes some safer bounds-checking functions for use in C and Part 2 relates to functions that do dynamic memory allocation.

The ISO C standardization committee (ISO/IEC JTC1/SC22/WG14) defined two technical reports:

  • TR 24731-1: Extensions to the C Library Part I: Bounds-checking interfaces

    This includes functions such as fopen_s() and strcpy_s() and sprintf_s(), which should be in some sense more secure than earlier analogs in the standard C library, checking for null pointers and buffer overflows. They are based on, but not identical with, functions with the same names in the Microsoft C library.

    It is included as the optional, but normative, Annex K in the current standard, ISO/IEC 9899:2011 'Programming Languages — C'.

    An evaluation from 2015 came to quite unflattering conclusions, basically wanting to recall it completely. n1967 Field Experience with Annex K - Bounds Checking Interfaces

  • TR 24731-2: Extensions to the C Library Part II: Dynamic allocation functions

    This includes functions such as asprintf() and vasprintf() which dynamically allocate enough space for the formatted output, and the getline() and getdelim() functions which are also defined in POSIX 2008, and strdup(). These were not standardized in C 2011.

65 questions
-1
votes
1 answer

sprintf_s() implicit declaration warning

I have a C code in which I have this line. sprintf_s(var, outfile_ppm, local_filecounter++); Here, var is char* type and local_filecounter is int type. When I run the code it gives me this warning: warning: implicit declaration of function…
npatel
  • 233
  • 3
  • 15
-2
votes
2 answers

C program stops working with scanf_s

I am fairly new at programming and I am having trouble with a piece of code. I am trying to input a word but when I run the program and enter the word it stops working. This is the code: int main(void){ char a[]= ""; printf("Enter…
CBeginner
  • 23
  • 3
-3
votes
1 answer

what is wrong in this program?

I wrote this simple bubble sort program using dynamic memory allocation. I am using VC++ compiler. // bubble_sort.cpp : Defines the entry point for the console application. // #include "stdafx.h" #include #include void…
Destructor
  • 14,123
  • 11
  • 61
  • 126
-3
votes
1 answer

Difference between scanf and scanf_s in C

Although my program gives the required output. There are many warnings showing scanf() shouldn't be used and try using scanf_s() instead. Possible cause of this warning?? This is happening to all the programs which are using the scanf function.…
user3743672
  • 151
  • 5
-4
votes
2 answers

C++ strcpy_s IntelliSense error

I have error in this place: strcpy_s(msgToGraphics, game.board_now()); the error is: IntelliSense: no instance of overloaded function "strcpy_s" matches the argument list argument types are: (char [1024], std::string) and here is the…
1 2 3 4
5