Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
a548d5a2
Commit
a548d5a2
authored
May 07, 2009
by
Juan Lang
Committed by
Alexandre Julliard
May 08, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
inetmib1: Check return values from SnmpUtilOid functions in utility functions.
parent
7a1f305d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
34 additions
and
18 deletions
+34
-18
main.c
dlls/inetmib1/main.c
+34
-18
No files found.
dlls/inetmib1/main.c
View file @
a548d5a2
...
...
@@ -431,45 +431,61 @@ static AsnInteger32 getItemAndInstanceFromTable(AsnObjectIdentifier *oid,
return
ret
;
}
static
void
setOidWithItem
(
AsnObjectIdentifier
*
dst
,
AsnObjectIdentifier
*
base
,
static
INT
setOidWithItem
(
AsnObjectIdentifier
*
dst
,
AsnObjectIdentifier
*
base
,
UINT
item
)
{
UINT
id
;
AsnObjectIdentifier
oid
;
INT
ret
;
SnmpUtilOidCpy
(
dst
,
base
);
oid
.
idLength
=
1
;
oid
.
ids
=
&
id
;
id
=
item
;
SnmpUtilOidAppend
(
dst
,
&
oid
);
ret
=
SnmpUtilOidCpy
(
dst
,
base
);
if
(
ret
)
{
oid
.
idLength
=
1
;
oid
.
ids
=
&
id
;
id
=
item
;
ret
=
SnmpUtilOidAppend
(
dst
,
&
oid
);
}
return
ret
;
}
static
void
setOidWithItemAndIpAddr
(
AsnObjectIdentifier
*
dst
,
static
INT
setOidWithItemAndIpAddr
(
AsnObjectIdentifier
*
dst
,
AsnObjectIdentifier
*
base
,
UINT
item
,
DWORD
addr
)
{
UINT
id
;
BYTE
*
ptr
;
AsnObjectIdentifier
oid
;
INT
ret
;
setOidWithItem
(
dst
,
base
,
item
);
oid
.
idLength
=
1
;
oid
.
ids
=
&
id
;
for
(
ptr
=
(
BYTE
*
)
&
addr
;
ptr
<
(
BYTE
*
)
&
addr
+
sizeof
(
DWORD
);
ptr
++
)
ret
=
setOidWithItem
(
dst
,
base
,
item
);
if
(
ret
)
{
id
=
*
ptr
;
SnmpUtilOidAppend
(
dst
,
&
oid
);
oid
.
idLength
=
1
;
oid
.
ids
=
&
id
;
for
(
ptr
=
(
BYTE
*
)
&
addr
;
ret
&&
ptr
<
(
BYTE
*
)
&
addr
+
sizeof
(
DWORD
);
ptr
++
)
{
id
=
*
ptr
;
ret
=
SnmpUtilOidAppend
(
dst
,
&
oid
);
}
}
return
ret
;
}
static
void
setOidWithItemAndInteger
(
AsnObjectIdentifier
*
dst
,
static
INT
setOidWithItemAndInteger
(
AsnObjectIdentifier
*
dst
,
AsnObjectIdentifier
*
base
,
UINT
item
,
UINT
instance
)
{
AsnObjectIdentifier
oid
;
INT
ret
;
setOidWithItem
(
dst
,
base
,
item
);
oid
.
idLength
=
1
;
oid
.
ids
=
&
instance
;
SnmpUtilOidAppend
(
dst
,
&
oid
);
ret
=
setOidWithItem
(
dst
,
base
,
item
);
if
(
ret
)
{
oid
.
idLength
=
1
;
oid
.
ids
=
&
instance
;
ret
=
SnmpUtilOidAppend
(
dst
,
&
oid
);
}
return
ret
;
}
static
struct
structToAsnValue
mib2IfEntryMap
[]
=
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment