git.droids-corp.org
/
dpdk.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
net/bnxt: fix out of bound access in bit handling
[dpdk.git]
/
drivers
/
net
/
bnxt
/
tf_core
/
stack.c
diff --git
a/drivers/net/bnxt/tf_core/stack.c
b/drivers/net/bnxt/tf_core/stack.c
index
3337073
..
9548063
100644
(file)
--- a/
drivers/net/bnxt/tf_core/stack.c
+++ b/
drivers/net/bnxt/tf_core/stack.c
@@
-27,6
+27,14
@@
stack_init(int num_entries, uint32_t *items, struct stack *st)
return 0;
}
return 0;
}
+/*
+ * Return the address of the items
+ */
+uint32_t *stack_items(struct stack *st)
+{
+ return st->items;
+}
+
/* Return the size of the stack
*/
int32_t
/* Return the size of the stack
*/
int32_t
@@
-73,7
+81,7
@@
int
stack_pop(struct stack *st, uint32_t *x)
{
if (stack_is_empty(st))
stack_pop(struct stack *st, uint32_t *x)
{
if (stack_is_empty(st))
- return -ENO
DATA
;
+ return -ENO
ENT
;
*x = st->items[st->top];
st->top--;
*x = st->items[st->top];
st->top--;