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
Actions