1
0
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:
Alasdair Kergon 2010-04-22 14:33:14 +00:00
parent 6d3dd87bba
commit 0e8134800e

View File

@ -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);
}