linapple-pie icon indicating copy to clipboard operation
linapple-pie copied to clipboard

FTP descend: Fix md5str returning pointer to local variable(NULL)

Open Zanop opened this issue 5 years ago • 12 comments

Hi,

this is a fix for the ftp not descending into directories. md5str() function returns pointer to local variable which is NULL outside of its scope. I'm using strndup to copy that string before passing it out and then freeing it to prevent mem leak.

Regards, Vlado

Zanop avatar Mar 09 '19 14:03 Zanop

Do you have a working ftp site? Doesn't work with asimov anymore

dabonetn avatar Mar 13 '19 00:03 dabonetn

Yes, it works with my changes. Did you try them?

Zanop avatar Mar 13 '19 00:03 Zanop

Did a git pull and compiled on my pi. It runs, but getting curl errors. (Also on my original version...) What version of retropie did you test on? I'm wondering if it's a stretch vs Jessie issue with curl.

dabonetn avatar Mar 13 '19 00:03 dabonetn

I'm on stretch, raspbian, not retripie. On the retro I hat the linapple running out of the box.

Zanop avatar Mar 13 '19 00:03 Zanop

Which libcurl do you have installed?

dabonetn avatar Mar 13 '19 00:03 dabonetn

Just checked my retripie sdcard, it's on stretch too and the binary linapple does not descend too. Libcurl on nonretropie is 7.52.1-5+deb9u9.

Will check if it works on the retripie from my source .

Zanop avatar Mar 13 '19 01:03 Zanop

Okay on the retripie version is similar and my from my source the ftp works, it's deb9u5 . Is the retripie Jessie originally, can't remember if I did upgrade on this one, it's a months old image.

Zanop avatar Mar 13 '19 01:03 Zanop

RetroPie was once using Jessie, but now uses Stretch. This works for me. I ran into the FTP failure message, because ~/.linapple/linapple.conf installed from RetroPie is not correct. I changed

FTP Local Dir = /home/pi/RetroPie/roms/apple2

and created dir

/home/pi/RetroPie/roms/apple2/cache

to fix it.

I may ask the RetroPie maintainers to fix this.

rhaleblian avatar Mar 14 '19 04:03 rhaleblian

pi@blackberry:~ $ (cd RetroPie-Setup/; git log | head ) commit 5dff90ef7a53a2648ada4ce6faf2c3a65d8e1879 Merge: 56bc17af 6ce74e99 Author: Jools Wills [email protected] Date: Wed Feb 20 14:19:29 2019 +0000

Merge pull request #2625 from psyke83/bluez_fixes

WIP: bluetooth: improve scan timeout functionality

commit 6ce74e997efa2a6109b5db8884ce8f7e2032f5f0

pi@blackberry:~ $ cat /etc/debian_version 9.8 pi@blackberry:~ $ uname -a Linux blackberry 4.14.98-v7+ #1200 SMP Tue Feb 12 20:27:48 GMT 2019 armv7l GNU/Linux

rhaleblian avatar Mar 14 '19 04:03 rhaleblian

BTW i did a apt update today too.

rhaleblian avatar Mar 14 '19 05:03 rhaleblian

Yes linapple config has never had the right ftp I think, you have to fix it yourself.

Zanop avatar Mar 16 '19 02:03 Zanop

That's right, and never will be correct for all cases unless eg retropie-setup rewrites it when installing.

rhaleblian avatar Mar 16 '19 19:03 rhaleblian