Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 599665 Details for
Bug 841183
Missing namelen check in __pmDecodeFetch
[?]
New
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.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
Resolve issues in decoding PCP fetch PDUs
pcp_fetch.patch (text/plain), 1.27 KB, created by
Nathan Scott
on 2012-07-23 01:01:47 UTC
(
hide
)
Description:
Resolve issues in decoding PCP fetch PDUs
Filename:
MIME Type:
Creator:
Nathan Scott
Created:
2012-07-23 01:01:47 UTC
Size:
1.27 KB
patch
obsolete
>diff --git a/src/libpcp/src/p_fetch.c b/src/libpcp/src/p_fetch.c >index 046917e..325d2ea 100644 >--- a/src/libpcp/src/p_fetch.c >+++ b/src/libpcp/src/p_fetch.c >@@ -66,18 +66,31 @@ __pmSendFetch(int fd, int from, int ctxnum, __pmTimeval *when, int numpmid, pmID > } > > int >-__pmDecodeFetch(__pmPDU *pdubuf, int *ctxnum, __pmTimeval *when, int *numpmid, pmID **pmidlist) >+__pmDecodeFetch(__pmPDU *pdubuf, int *ctxnum, __pmTimeval *when, int *numpmidp, pmID **pmidlist) > { > fetch_t *pp; >+ char *pduend; >+ int numpmid; > int j; > > pp = (fetch_t *)pdubuf; >+ pduend = (char *)pdubuf + pp->hdr.len; >+ >+ if (pduend - (char*)pp < sizeof(fetch_t)) >+ return PM_ERR_IPC; >+ numpmid = ntohl(pp->numpmid); >+ if (numpmid <= 0) >+ return PM_ERR_IPC; >+ if ((pduend - (char*)pp) != sizeof(fetch_t) + ((sizeof(pmID)) * (numpmid-1))) >+ return PM_ERR_IPC; >+ >+ for (j = 0; j < numpmid; j++) >+ pp->pmidlist[j] = __ntohpmID(pp->pmidlist[j]); >+ > *ctxnum = ntohl(pp->ctxnum); > when->tv_sec = ntohl(pp->when.tv_sec); > when->tv_usec = ntohl(pp->when.tv_usec); >- *numpmid = ntohl(pp->numpmid); >- for (j = 0; j < *numpmid; j++) >- pp->pmidlist[j] = __ntohpmID(pp->pmidlist[j]); >+ *numpmidp = numpmid; > *pmidlist = pp->pmidlist; > __pmPinPDUBuf((void *)pdubuf); > 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 Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 841183
:
599665
|
599891