Commit 9a442be9 authored by Oswald Buddenhagen's avatar Oswald Buddenhagen
Browse files

qmake: fix hypothetical raw data leak in $$replace()


the replacement value may well constitute the whole output string - this
is in fact common, given this rather typical usage pattern:

  BAR = $$replace(FOO, -flag, -otherflag)

this must be considered when constructing the return value.
compare 3c8134958c6.

as of now, this is irrelevant, as QString::replace(QRegExp, QString) will
always memcpy the replacement into a detached copy of the target, but one
never knows.

Change-Id: Ia1f271f45023746040fc28ce6d88a6609e05e5c2
Reviewed-by: default avatarJoerg Bornemann <joerg.bornemann@qt.io>
(cherry picked from qtbase/e8b9a17a3bd770f6bf1bc8f4e0586565acf425e2)
Reviewed-by: default avatarTor Arne Vestbø <tor.arne.vestbo@qt.io>
Showing with 5 additions and 1 deletion
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment