Fix non-deterministic use after free in WebDAV
ClosedPublic

Authored by rnicole on Apr 17 2018, 12:33 PM.

Details

Summary

Don't use a KJob in a .then() clause following its execution.

Thanks Christian!

Diff Detail

Repository
R9 Sink
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
rnicole requested review of this revision.Apr 17 2018, 12:33 PM
rnicole created this revision.
cmollekopf added inline comments.Apr 17 2018, 12:40 PM
examples/webdavcommon/webdav.cpp
124

The idea is not to replace the continuation, but just to have a result extractor. Normally this extractor should not capture anything.

In this case you definitely need the continuation because otherwise you can't do the error handling properly.

221

If you are sure of what you're getting, and in this case you are, you can replace the dynamic_cast with a static_cast.

rnicole updated this revision to Diff 32389.Apr 17 2018, 1:31 PM

Separate value extraction and processing

rnicole marked 2 inline comments as done.Apr 17 2018, 1:31 PM
This revision was not accepted when it landed; it landed in state Needs Review.Apr 17 2018, 2:04 PM
This revision was automatically updated to reflect the committed changes.