]> git.sur5r.net Git - minitube/commit
Be careful about the lifetime of stack variables
authordcoppa <dcoppa@gmail.com>
Tue, 12 May 2015 11:56:55 +0000 (13:56 +0200)
committerdcoppa <dcoppa@gmail.com>
Tue, 12 May 2015 11:56:55 +0000 (13:56 +0200)
commit9b1ff7b5b800f5e34f39bf9289d0bd0ca89949c4
tree838ae3e0959ae2aa03f5ee53941a1507338daddf
parent4f746fa15b4176e8e28393d234e356b06f4c1daa
Be careful about the lifetime of stack variables

This commit fixes minitube hanging indefinitely on OpenBSD while showing search results.

ptr is pointing to free'd memory, causing an infinite loop when parsing video duration property into src/paginatedvideosource.cpp (L148)

See also the following links for a better explanation:

http://blog.aaronballman.com/2011/07/returning-stack-based-values/

https://wiki.qt.io/Qt_project_org_faq#How_can_I_convert_a_QString_to_char.2A_and_vice_versa.3F
src/datautils.cpp