crowell / modpagespeed_tmp

Automatically exported from code.google.com/p/modpagespeed
Apache License 2.0
0 stars 0 forks source link

InitializeNested in CssHierarchy initializes a stringpiece with too wide a scope #601

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
The url_ variable scoped to CssHierarchy in Initalizenested is sometimes 
initialized with a stack scoped string (See calling functions to confirm this) 
If the stack scoped string is destroyed the url_ points to invalid data, this 
may or may not cause a crash in further processing.

Fix: make url_ a GoogleString, GoogleUrl or initialize a secondary variable.

Original issue reported on code.google.com by kspoels...@we-amp.com on 7 Jan 2013 at 9:05

GoogleCodeExporter commented 9 years ago
Good catch.  Did you find this via valgrind or something?

Original comment by jmara...@google.com on 7 Jan 2013 at 9:12

GoogleCodeExporter commented 9 years ago
No, :(, a css file was not loaded in the tests, a lot of old fashioned tracing 
and debugging followed ...

Original comment by kspoels...@we-amp.com on 9 Jan 2013 at 6:15

GoogleCodeExporter commented 9 years ago
This is fixed in r2452. Are you able to build from source and try again?
Thanks!

Original comment by matterb...@google.com on 30 Jan 2013 at 5:43