Re: [PATCH] of: Fix overflow bug in string property parsing functions

2014-11-04 Thread Grant Likely
On Tue, 04 Nov 2014 01:43:24 +0100 , "Rafael J. Wysocki" wrote: > On Monday, November 03, 2014 11:38:24 PM Grant Likely wrote: > > [cut] > > > diff --git a/include/linux/of.h b/include/linux/of.h > > index 6545e7aec7bb..3b3c6e849ae8 100644 > > --- a/include/linux/of.h > > +++

Re: [PATCH] of: Fix overflow bug in string property parsing functions

2014-11-04 Thread Grant Likely
On Tue, 04 Nov 2014 01:43:24 +0100 , Rafael J. Wysocki r...@rjwysocki.net wrote: On Monday, November 03, 2014 11:38:24 PM Grant Likely wrote: [cut] diff --git a/include/linux/of.h b/include/linux/of.h index 6545e7aec7bb..3b3c6e849ae8 100644 --- a/include/linux/of.h +++

Re: [PATCH] of: Fix overflow bug in string property parsing functions

2014-11-03 Thread Rafael J. Wysocki
On Monday, November 03, 2014 11:38:24 PM Grant Likely wrote: [cut] > diff --git a/include/linux/of.h b/include/linux/of.h > index 6545e7aec7bb..3b3c6e849ae8 100644 > --- a/include/linux/of.h > +++ b/include/linux/of.h > @@ -267,14 +267,12 @@ extern int of_property_read_u64(const struct >

[PATCH] of: Fix overflow bug in string property parsing functions

2014-11-03 Thread Grant Likely
The string property read helpers will run off the end of the buffer if it is handed a malformed string property. Rework the parsers to make sure that doesn't happen. At the same time add new test cases to make sure the functions behave themselves. The original implementations of

[PATCH] of: Fix overflow bug in string property parsing functions

2014-11-03 Thread Grant Likely
The string property read helpers will run off the end of the buffer if it is handed a malformed string property. Rework the parsers to make sure that doesn't happen. At the same time add new test cases to make sure the functions behave themselves. The original implementations of

Re: [PATCH] of: Fix overflow bug in string property parsing functions

2014-11-03 Thread Rafael J. Wysocki
On Monday, November 03, 2014 11:38:24 PM Grant Likely wrote: [cut] diff --git a/include/linux/of.h b/include/linux/of.h index 6545e7aec7bb..3b3c6e849ae8 100644 --- a/include/linux/of.h +++ b/include/linux/of.h @@ -267,14 +267,12 @@ extern int of_property_read_u64(const struct device_node