Custom Query (3933 matches)

Filters
 
Or
 
  
 
Columns

Show under each result:


Results (442 - 444 of 3933)

Ticket Resolution Summary Owner Reporter
#1393 Fixed Script crashes with error reported in EventLog.au3 at line 475 Jpm jonwetherbee@…
Description

My Usage: Script uses EventLog.au3 to access remote event logs. The task is to simply open, read all available records, and close the log.

Problem: Shortly after starting, script crashes reporting an error at line 475 of EventLog.au3 involving use of a subscript with a non-array variable. This code assumes _SecurityLookupAccountSid only returns an array. In fact, _SecurityLookupAccountSid can return zero. Initial Solution: Change the code in EventLog.au3 line 475 to test for an array before using it.

Below are the two functions involved in the problem. The first is _EventLogDecodeUserName from EventLog.au3 - where the error is. The second is _SecurityLookupAccountSid from Security.au3 for reference only.

######################################################

REFERENCE: (Taken from EventLog.au3)

######################################################

Note that _EventLogDecodeUserName assumes _SecurityLookupAccountSid will always returns an array.

; #INTERNAL_USE_ONLY# =========================================================================================================== ; Name...........: _EventLogDecodeUserName ; Description ...: Decodes the user name from an event log record ; Syntax.........: _EventLogDecodeUserName($tEventLog) ; Parameters ....: $tEventLog - tagEVENTLOGRECORD structure ; Return values .: Success - User name ; Author ........: Paul Campbell (PaulIA) ; Modified.......: Gary Frost (gafrost) ; Remarks .......: This function is used internally ; Related .......: ; Link ..........: ; Example .......: ; =============================================================================================================================== Func _EventLogDecodeUserName($tEventLog)

Local $pEventLog = DllStructGetPtr($tEventLog) If DllStructGetData($tEventLog, "UserSidLength") = 0 Then Return "" Local $pAcctSID = $pEventLog + DllStructGetData($tEventLog, "UserSidOffset") Local $aAcctInfo = _SecurityLookupAccountSid($pAcctSID)

; Return $aAcctInfo[1] [original line 475] Revised 5-Jan-2010 - jrw

	If IsArray($aAcctInfo) Then Return $aAcctInfo[1]	Return ''

EndFunc ;==>_EventLogDecodeUserName

######################################################

REFERENCE: (Taken from Security.au3)

######################################################

Note that _SecurityLookupAccountSid MAY NOT return an array.

=======

; #FUNCTION# ==================================================================================================================== ; Name...........: _SecurityLookupAccountSid ; Description ...: Retrieves the name of the account for a SID ; Syntax.........: _SecurityLookupAccountSid($vSID) ; Parameters ....: $vSID - Either a binary SID or a string SID ; Return values .: Success - Array with the following format: ; |$aAcct[0] - Account name ; |$aAcct[1] - Domain name ; |$aAcct[2] - SID type, which can be one of the following values: ; | 1 - Indicates a user SID ; | 2 - Indicates a group SID ; | 3 - Indicates a domain SID ; | 4 - Indicates an alias SID ; | 5 - Indicates a SID for a well-known group ; | 6 - Indicates a SID for a deleted account ; | 7 - Indicates an invalid SID ; | 8 - Indicates an unknown SID type ; | 9 - Indicates a SID for a computer ; Failure - 0 ; Author ........: Paul Campbell (PaulIA) ; Modified.......: ; Remarks .......: ; Related .......: _SecurityLookupAccountName, _SecurityGetAccountSid ; Link ..........: @@MsdnLink@@ LookupAccountSid ; Example .......: ; =============================================================================================================================== Func _SecurityLookupAccountSid($vSID)

Local $pSID, $aAcct[3]

If IsString($vSID) Then

Local $tSID = _SecurityStringSidToSid($vSID) $pSID = DllStructGetPtr($tSID)

Else

$pSID = $vSID

EndIf If Not _SecurityIsValidSid($pSID) Then Return SetError(-1, 0, 0)

Local $aResult = DllCall("advapi32.dll", "bool", "LookupAccountSidW", "ptr", 0, "ptr", $pSID, "wstr", "", "dword*", 256, _

"wstr", "", "dword*", 256, "int*", 0)

If @error Then Return SetError(@error, @extended, 0) If Not $aResult[0] Then Return 0

Local $aAcct[3] $aAcct[0] = $aResult[3] ; Name $aAcct[1] = $aResult[5] ; Domain $aAcct[2] = $aResult[7] ; SNU Return $aAcct

EndFunc ;==>_SecurityLookupAccountSid

#1395 Fixed DLLCallbacks on Exit trancexx ProgAndy
Description

I wish it would be possible to have DLLCllbacks persist longer in the destruction chain on script termination. At least it would be great to have them alive when objects are released. This would allow to implement the 'hooking into IDispatch' directly in AutoIt without errors and without CoCreateInstance. Therefore an Object::release-dllcallback is needed and up to now AutoIt crashes and fails to exit when there are such objects on termination. http://www.autoitscript.com/forum/index.php?showtopic=107678&view=findpost&p=759950 You can come around this by freeing the Object-Variable manually, but you can't do that on an AutoIt-Error like "Array out of bounds" or any other error on which Autoit is terminating without calling the ExitFuncs. I don't know if this change is possible, but if it is this would be a great enhancement in favour of supporting objects.

PS: I think, this is related to tracid #1319

#1396 Fixed DllCallbackGetPtr crashes on invalid handle Valik anonymous
Description

Not much to say. DllCallbackGetPtr() produces an access violation on bad handle.

DllCallbackGetPtr(0)
Batch Modify
Note: See TracBatchModify for help on using batch modify.
Note: See TracQuery for help on using queries.