Project

General

Profile

Bug #318

Updated by Anthony Mallet almost 3 years ago

The following code excerpt demonstrates the issue: 

 <pre> 
   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"); "posterDelete");@ 
 </pre> 

 The @posterRead()@ will not fail, even though memory has never been initialized. 

 The attached patch will fix this.

Back