Message ID | 1431638585-13524-1-git-send-email-mike.holmes@linaro.org |
---|---|
State | New |
Headers | show |
Reviewed-by: Balasubramanian Manoharan <bala.manoharan@linaro.org> On 15 May 2015 at 02:53, Mike Holmes <mike.holmes@linaro.org> wrote: > fixes https://bugs.linaro.org/show_bug.cgi?id=1534 > > Signed-off-by: Mike Holmes <mike.holmes@linaro.org> > --- > > The case sudo ./example/classifier/odp_classifier -i eth0 -m 0 -p "" > now returns > odp_classifier.c:599:parse_pmr_policy():Invalid ODP_PMR_TERM string > > example/classifier/odp_classifier.c | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/example/classifier/odp_classifier.c b/example/classifier/odp_classifier.c > index d78eb7b..3cc6738 100644 > --- a/example/classifier/odp_classifier.c > +++ b/example/classifier/odp_classifier.c > @@ -559,6 +559,9 @@ static void swap_pkt_addrs(odp_packet_t pkt_tbl[], unsigned len) > > static int convert_str_to_pmr_enum(char *token, odp_pmr_term_e *term) > { > + if (NULL == token) > + return -1; > + > if (0 == strcasecmp(token, "ODP_PMR_SIP_ADDR")) { > *term = ODP_PMR_SIP_ADDR; > return 0; > -- > 2.1.4 >
Merged, Thanks. On 05/15/2015 09:08, Bala Manoharan wrote: > Reviewed-by: Balasubramanian Manoharan <bala.manoharan@linaro.org> > > On 15 May 2015 at 02:53, Mike Holmes <mike.holmes@linaro.org> wrote: >> fixes https://bugs.linaro.org/show_bug.cgi?id=1534 >> >> Signed-off-by: Mike Holmes <mike.holmes@linaro.org> >> --- >> >> The case sudo ./example/classifier/odp_classifier -i eth0 -m 0 -p "" >> now returns >> odp_classifier.c:599:parse_pmr_policy():Invalid ODP_PMR_TERM string >> >> example/classifier/odp_classifier.c | 3 +++ >> 1 file changed, 3 insertions(+) >> >> diff --git a/example/classifier/odp_classifier.c b/example/classifier/odp_classifier.c >> index d78eb7b..3cc6738 100644 >> --- a/example/classifier/odp_classifier.c >> +++ b/example/classifier/odp_classifier.c >> @@ -559,6 +559,9 @@ static void swap_pkt_addrs(odp_packet_t pkt_tbl[], unsigned len) >> >> static int convert_str_to_pmr_enum(char *token, odp_pmr_term_e *term) >> { >> + if (NULL == token) >> + return -1; >> + >> if (0 == strcasecmp(token, "ODP_PMR_SIP_ADDR")) { >> *term = ODP_PMR_SIP_ADDR; >> return 0; >> -- >> 2.1.4 >> > _______________________________________________ > lng-odp mailing list > lng-odp@lists.linaro.org > https://lists.linaro.org/mailman/listinfo/lng-odp
diff --git a/example/classifier/odp_classifier.c b/example/classifier/odp_classifier.c index d78eb7b..3cc6738 100644 --- a/example/classifier/odp_classifier.c +++ b/example/classifier/odp_classifier.c @@ -559,6 +559,9 @@ static void swap_pkt_addrs(odp_packet_t pkt_tbl[], unsigned len) static int convert_str_to_pmr_enum(char *token, odp_pmr_term_e *term) { + if (NULL == token) + return -1; + if (0 == strcasecmp(token, "ODP_PMR_SIP_ADDR")) { *term = ODP_PMR_SIP_ADDR; return 0;
fixes https://bugs.linaro.org/show_bug.cgi?id=1534 Signed-off-by: Mike Holmes <mike.holmes@linaro.org> --- The case sudo ./example/classifier/odp_classifier -i eth0 -m 0 -p "" now returns odp_classifier.c:599:parse_pmr_policy():Invalid ODP_PMR_TERM string example/classifier/odp_classifier.c | 3 +++ 1 file changed, 3 insertions(+)