Login
Log in using an SSO provider:
Fedora Account System
Red Hat Associate
Red Hat Customer
Login using a Red Hat Bugzilla account
Forgot Password
Create an Account
Red Hat Bugzilla – Attachment 1409995 Details for
Bug 1558107
strerror_r returns a malformed buffer
Home
New
Search
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh90 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
[?]
This site requires JavaScript to be enabled to function correctly, please enable it.
minimized reproducer
test.c (text/plain), 639 bytes, created by
Robbie Harwood
on 2018-03-19 16:10:59 UTC
(
hide
)
Description:
minimized reproducer
Filename:
MIME Type:
Creator:
Robbie Harwood
Created:
2018-03-19 16:10:59 UTC
Size:
639 bytes
patch
obsolete
>#define _GNU_SOURCE > >#include <stdio.h> >#include <stdlib.h> >#include <string.h> > >#define MAX_GP_STRERROR 1024 > >const char gp_internal_err[] = "Internal strerror_r() error."; > >int main(int argc, char *argv[]) { > static __thread char buf[MAX_GP_STRERROR]; > char *ret; > > ret = strerror_r(2, buf, MAX_GP_STRERROR); > if (ret == NULL) { > memset(buf, 0, MAX_GP_STRERROR); > strncpy(buf, gp_internal_err, MAX_GP_STRERROR); > buf[MAX_GP_STRERROR -1] = '\0'; > } else if (ret != buf) { > memset(buf, 0, MAX_GP_STRERROR); > strncpy(buf, ret, MAX_GP_STRERROR); > buf[MAX_GP_STRERROR -1] = '\0'; > } > printf("%s\n", buf); > return 0; >}
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 1558107
: 1409995