bill-zhanxg / onedrive-sync-anywhere

Allows the user to sync files outside the OneDrive folder by creating a shortcut
MIT License
2 stars 0 forks source link

Use after free when creating shortcuts #1

Open Vrtgs opened 3 weeks ago

Vrtgs commented 3 weeks ago

You return a dangling pointer to data that is freed at the end of scopehere, this is just straight up UB, although sometimes maybe it works on some build configurations

bill-zhanxg commented 3 weeks ago

That was my first time using Rust lol, if it works, why change it ¯_(ツ)_/¯

Vrtgs commented 3 weeks ago

Oh lmao, I didn't know, I was just looking at code using ShellExecute because I wanted to use it, ty it was of help, but the thing is UB it might work it might not idk haven't tested it

bill-zhanxg commented 3 weeks ago

lol Alright, np. Go and test it then