Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re^3: Win32::API::Call: parameter 1 had a buffer overflow at c:/Perl/site/lib/Win32/Security/Raw.pm line 242

by Anonymous Monk
on Nov 03, 2015 at 22:54 UTC ( [id://1146854]=note: print w/replies, xml ) Need Help??


in reply to Re^2: Win32::API::Call: parameter 1 had a buffer overflow at c:/Perl/site/lib/Win32/Security/Raw.pm line 242
in thread Win32::API::Call: parameter 1 had a buffer overflow at c:/Perl/site/lib/Win32/Security/Raw.pm line 242

So parameter 1 is $pObjectName?

Please try padding it and report what happens :)  $pObjectName .= "\0" x 100; or x 1000

  • Comment on Re^3: Win32::API::Call: parameter 1 had a buffer overflow at c:/Perl/site/lib/Win32/Security/Raw.pm line 242
  • Download Code

Replies are listed 'Best First'.
Re^4: Win32::API::Call: parameter 1 had a buffer overflow at c:/Perl/site/lib/Win32/Security/Raw.pm line 242
by dt667 (Acolyte) on Nov 04, 2015 at 13:43 UTC

    So I tried     $pObjectName .= "\0" x 100;     $pObjectName .= "\0" x 1000;     $pObjectName .= "\0" x 10000; and each one gave the same buffer overflow error.

    I also noticed that earlier in the main project we call Win32::Security::NamedObject which then calls Win32::Security::Raw and it was working. So I tried duplicating this same logic where I am seeing the error with no luck.

    I then tried changing the namedobject instance to mimic the problem code and the outcome was the same. The first call worked, subsequent calls failed with the error. So I thought, remove the first call altogether to see if it is some weird memory issue. That also did not work.

    On a side note, I have seen it "work" on rare occasion (~1 out of 100 or so runs). When this occurs, the values for $ppsidOwner, $ppsidGroup, $ppDacl, $ppSacl, $ppSecurityDescriptor are the same for every single registry key checked. This leads me to believe the underlying API call is just reading the same memory space over and over again because the values are never the same with my script.

    Thoughts? This is truly boggling my mind!

      Thoughts?

      Maybe $pObjectName isn't 1, maybe $ObjectType is 1, try padding $ObjectType

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1146854]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others perusing the Monastery: (7)
As of 2024-04-19 12:16 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found