Actions
Bug #318
closedposterRead() may read garbage when a poster has never been written
Status:
Closed
Priority:
Normal
Assignee:
-
Description
The following code excerpt demonstrates the issue:
char buf[42]; POSTER_ID p; if (posterCreate("foo", sizeof(buf), &p) != OK) errx(2, "posterCreate"); if (posterRead(p, 0, buf, sizeof(buf)) != sizeof(buf)) errx(2, "posterRead"); if (posterDelete(p) != OK) errx(2, "posterDelete");
The posterRead()
will not fail, even though memory has never been initialized.
The attached patch will fix this.
Files
Updated by Anthony Mallet over 3 years ago
- Status changed from New to Closed
Applied in changeset pocolibs|03056717e85548530030175de5feed626be1602a.
Actions