lils000 / xvid4psp

Automatically exported from code.google.com/p/xvid4psp
GNU General Public License v2.0
0 stars 0 forks source link

App.xaml.cs uses buggy code to submit to the clipboard #79

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. In a debugger that disassembles C#, step into Marshal.StringToHGlobalUni.
2. Read the source code and notice the LocalAlloc with LMEM_FIXED.
3. Read the docs for SetClipbaordData
4. Scream
5. Read the comment here on StackOverflow: 
http://stackoverflow.com/questions/14082942/copy-result-to-clipboard/24698804#24
698804

What is the expected output? What do you see instead?

The expected output is to not corrupt the system memory.  Instead you see that 
the code may crash.

What version of the product are you using? On what operating system?

Not using the software.  Just googled for this code pattern after having 
problems with it.  Here's the version I spotted it in: 
https://code.google.com/p/xvid4psp/source/browse/trunk/App.xaml.cs?r=179

Please provide any additional information below.

Original issue reported on code.google.com by da...@sprettur.is on 11 Jul 2014 at 2:12

GoogleCodeExporter commented 8 years ago
Yes, you are right. Thanks for pointing this out.

Original comment by forc...@gmail.com on 27 Oct 2014 at 8:52