mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-29 15:22:30 +03:00
Don't walk rightmost through NULL pointers.
This commit is contained in:
parent
9d8d6b1d18
commit
5ce8c9ae77
@ -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