|
Home About Us A-Z Index Search * Contact Us Register Login Press ShopThe Open Brand -- Problem Reporting and Interpretations System |
Problem Report 1555 Details
Show help | Quick Search | Submit a Test Suite Support Request | Click here to view your privileges
This page provides all information on Problem Report 1555.
Report 1555 Actions
Problem Report Number 1555 Submitter's Classification Test Suite problem State Resolved Resolution Test Suite Deficiency (TSD) Problem Resolution ID TSD.X.0837 Raised 2001-01-03 08:00 Updated 2003-03-13 08:00 Published 2001-01-29 08:00 Product Standard Internationalised System Calls and Libraries Extended V2 (UNIX 98) Certification Program The Open Brand certification program Test Suite VSU version 5.1.1 Test Identification CAPI.hdr/misc/xcurses4 90 Problem Summary TSD4U.00298 When instr() is defined as a macro the test may fail due to a buffer overrun Problem Text
The following is part of the file "L.xcurses4" in tset/CAPI.hdr/misc/xcurses4/
that corresponds to the test case 90:
.
.
.
static void test387A(void)
{
#if 1
#ifdef instr
int ret;
int arg1 = 0;
char * ret1;
char * str="test";
pid_t pid;
#endif
#endif
#if 0
puts("ERROR: Header file curses.h not found");
result_flags |= 1; /* FAIL */
#else
#ifndef instr
result_flags |= (1<<4); /* UNSUP */
#else
alarm(5*SPEEDFACTOR);
s2 = 0;
infd = fopen("/dev/tty", "r");
outfd = fopen("/dev/tty", "w");
if (infd == 0 || outfd == 0) {
perror("could not open /dev/tty");
result_flags |= 1; /* FAIL */
s2 = -1;
}
else if (newterm(getenv("TERM"), outfd, infd) == 0) {
puts("newterm() failed");
result_flags |= 1; /* FAIL */
s2 = -1;
}
if (s2 == -1)
return;
(void) instr(ret1 = (arg1++, str));
.
.
.
The function instr() places a string of characters from the current
window into the array pointed to by 'str', starting at the current
position and ending at the end of the line. In this case, it starts
at the beginging of the line and ends at the end of the line. And
each line has 80 columns. Thefore, the above instr() function will
place at least 80 bytes into 'str'. However, this program has
allocated only (4+1) bytes for 'str' (actually it has initialized
'str' with "test".) As a result, the program causes buffer overrun
and the test result gets unreliable.Test Output
************************************************************************
/tset/CAPI.hdr/misc/xcurses4/T.xcurses4 90 Unresolved
Test Description:
Base Conditional Conformance
If the macro int instr(char *str) is declared in curses.h it shall
evaluate its argument exactly once, fully protected by parentheses
where necessary, protect its return value with parentheses, and return
a value of the correct type.
Test Information:
Feature test macros: -D_XOPEN_SOURCE=500
Test returned unexpected exit code 255
Feature test macros: -D_XOPEN_SOURCE=500 -D_POSIX_SOURCE
Test returned unexpected exit code 255
Feature test macros: -D_XOPEN_SOURCE=500 -D_POSIX_C_SOURCE=1
Test returned unexpected exit code 255
Feature test macros: -D_XOPEN_SOURCE=500 -D_POSIX_C_SOURCE=1
-D_POSIX_SOURCE
Test returned unexpected exit code 255
Feature test macros: -D_XOPEN_SOURCE=500 -D_POSIX_C_SOURCE=2
Test returned unexpected exit code 255
Feature test macros: -D_XOPEN_SOURCE=500 -D_POSIX_C_SOURCE=2
-D_POSIX_SOURCE
Test returned unexpected exit code 255
Feature test macros: -D_XOPEN_SOURCE=500 -D_POSIX_C_SOURCE=199309
Test returned unexpected exit code 255
Feature test macros: -D_XOPEN_SOURCE=500 -D_POSIX_C_SOURCE=199309
-D_POSIX_SOURCE
Test returned unexpected exit code 255
Feature test macros: -D_XOPEN_SOURCE=500 -D_POSIX_C_SOURCE=199506
Test returned unexpected exit code 255
Feature test macros: -D_XOPEN_SOURCE=500 -D_POSIX_C_SOURCE=199506
-D_POSIX_SOURCE
Test returned unexpected exit code 255
************************************************************************Review Information
Review Type TSMA Review Start Date null Completed null Status Complete Review Recommendation No Resolution Given Review Response
This is accepted as a fault in the test suite.
Review Type SA Review Start Date null Completed null Status Complete Review Resolution Test Suite Deficiency (TSD) Review Conclusion
This is an agreed Test Suite Deficiency.
Problem Reporting System Options:
- View Report 1555
- List All PRs
- Search Reports
- Email the System Administrator
- View the The Open Brand Interpretations Database User Manual
Contact the Certification Authority