|
-
Feb 29th, 2016, 05:48 AM
#1
Thread Starter
Evil Genius
Buffers & security question
So it's been a loooooong time since I've properly done any Win32 API stuff. Years ago, samples like these (& my code too) were commonplace: http://allapi.mentalis.org/apilist/EnumPrinters.shtml# or http://word.mvps.org/faqs/macrosvba/...lePrinters.htm.
In essence:
[LIST][1]Try an API call once, passing a dummy value for one of the byref buffer-length related parameters
[2]Check the return value - if it didn't work, use the retrieved buffer length (now known) & just call the same API call again[/ LIST]
Um, so wouldn't this cause one of those nasty buffer overflow security leak errors I've heard so much about in the news, causing potentially full remote control? What's the 2016 preferred way of coding & calling APIs with buffer length parameters please?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|