A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://www.open-std.org/jtc1/sc22/wg14/www/docs/n1673.htm below:

Defect report #4nn

Document: N1673
Date: 2013-02-11
Defect Report #4nnPrevious Defect Report < - > Next Defect Report


Submitter: Douglas Walls
Submission Date: 2013-02-11
Source:WG14
Reference Document: N1673
Version: 1.0
Date:
Subject: Should gets_s discard next input line when (s == NULL) ?

Summary

gets_s Annex K.3.5.4.1p2 says:

"If there is a runtime-constraint violation, s[0] is set to the null


character, and characters are read and discarded from stdin until a
new-line character is read, or end-of-file or a read error occurs."

The runtime-constraint violation here can be caused by a null "s"


pointer.  Should we discard the next input line even if (s == NULL) ?

The way it is written, it looks like the answer is yes.  However it is


not clear to us that that was the intent.  Note also that s[0] cannot be
set to the null character when s==NULL.

Suggested Technical Corrigendum


Previous Defect Report < - > Next Defect Report


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4