summaryrefslogtreecommitdiff
path: root/libsi/descriptor.h
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2004-06-06 14:53:21 +0200
committerKlaus Schmidinger <vdr@tvdr.de>2004-06-06 14:53:21 +0200
commitdef0c7aaa0b79d0251758e6645c3edd03107b367 (patch)
treeb4133cdc3ca22f7873d0bd21c7d9bdc487102c6a /libsi/descriptor.h
parent125f3fe07b31fa8e4b74f222095a68f1eb37833d (diff)
downloadvdr-def0c7aaa0b79d0251758e6645c3edd03107b367.tar.gz
vdr-def0c7aaa0b79d0251758e6645c3edd03107b367.tar.bz2
Modified 'libsi' to require callers to state the buffer sizes when getting strings in order to avoid buffer overflows1.3.10
Diffstat (limited to 'libsi/descriptor.h')
-rw-r--r--libsi/descriptor.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/libsi/descriptor.h b/libsi/descriptor.h
index db3bba61..94959231 100644
--- a/libsi/descriptor.h
+++ b/libsi/descriptor.h
@@ -6,7 +6,7 @@
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
- * $Id: descriptor.h 1.9 2004/03/26 15:26:03 kls Exp $
+ * $Id: descriptor.h 1.10 2004/06/06 13:51:29 kls Exp $
* *
***************************************************************************/
@@ -55,12 +55,12 @@ public:
//same semantics as with SI::String
char *getText(const char *separation1="\t", const char *separation2="\n");
//buffer must at least be getTextLength(), getMaximumTextLength() is a good choice
- char *getText(char *buffer, const char *separation1="\t", const char *separation2="\n");
+ char *getText(char *buffer, int size, const char *separation1="\t", const char *separation2="\n");
//these only return the non-itemized text fields in concatenated form
int getMaximumTextPlainLength();
char *getTextPlain();
- char *getTextPlain(char *buffer);
+ char *getTextPlain(char *buffer, int size);
//these only return the itemized text fields in concatenated form.
//Between the description and the text the separation1 character is used,
@@ -68,11 +68,11 @@ public:
//Director\tSteven Spielberg\nActor\tMichael Mendl\n
int getMaximumTextItemizedLength(const char *separation1="\t", const char *separation2="\n");
char *getTextItemized(const char *separation1="\t", const char *separation2="\n");
- char *getTextItemized(char *buffer, const char *separation1="\t", const char *separation2="\n");
+ char *getTextItemized(char *buffer, int size, const char *separation1="\t", const char *separation2="\n");
//returns the itemized text pair by pair. Maximum length for buffers is 256.
//Return value is false if and only if the end of the list is reached.
//The argument valid indicates whether the buffers contain valid content.
- bool getTextItemized(Loop::Iterator &it, bool &valid, char *itemDescription, char *itemText);
+ bool getTextItemized(Loop::Iterator &it, bool &valid, char *itemDescription, char *itemText, int sizeItemDescription, int sizeItemText);
};
class TimeShiftedEventDescriptor : public Descriptor {