mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-21 13:34:40 +03:00
Don't walk rightmost through NULL pointers.
This commit is contained in:
parent
6d3dd87bba
commit
0e8134800e
@ -16,8 +16,6 @@
|
||||
#include "dmlib.h"
|
||||
#include "parse_rx.h"
|
||||
|
||||
#include <ctype.h>
|
||||
|
||||
struct parse_sp { /* scratch pad for the parsing process */
|
||||
struct dm_pool *mem;
|
||||
int type; /* token type, 0 indicates a charset */
|
||||
@ -345,7 +343,7 @@ static unsigned _depth(struct rx_node *r, unsigned leftmost)
|
||||
{
|
||||
int count = 1;
|
||||
|
||||
while (r->type != CHARSET) {
|
||||
while (r->type != CHARSET && LEFT(r)) {
|
||||
count++;
|
||||
r = LEFT(r);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user