View Issue Details

IDProjectCategoryView StatusLast Update
0001245Ecere SDKextraspublic2022-01-10 13:15
Reportermingodad Assigned To 
PrioritynormalSeveritymajorReproducibilityalways
Status closedResolutionno change required 
Platform-crossplatformOS-OS Version-
Summary0001245: Invalid use of stack variable in samples/net/browse
DescriptionIn the sample "samples/net/browse/browser.ec" there is an invalid usage of a stack variable:
=====
   bool PageOpened()
   {
      char caption[MAX_LOCATION];

      strcpy(caption, "Ecere Web Browser - ");
      strcat(caption, htmlView.title);

      text = caption; ////<<<<<<<<<<<<!!!!! caption is out of scope/invalid when the function return
      addressBar.address.Clear();
      addressBar.address.PutS(htmlView.fileName);
      return true;
   }
=====
TagsNo tags attached.

Activities

jerome

2022-01-10 13:15

administrator   ~0001506

'text' here is a property that will make its own copy of the stack memory, this is not an issue.

Issue History

Date Modified Username Field Change
2022-01-10 11:54 mingodad New Issue
2022-01-10 13:15 jerome Status new => closed
2022-01-10 13:15 jerome Resolution open => no change required
2022-01-10 13:15 jerome Note Added: 0001506