Displaying 20 results from an estimated 27 matches for "max_length".
2014 Sep 26
0
Patch to improve malformed vorbiscomment handling
...__IOHandle handle, FLAC__IOCallback_Read read_cb, FLAC__StreamMetadata_VorbisComment *block);
+static FLAC__Metadata_SimpleIteratorStatus read_metadata_block_data_vorbis_comment_entry_cb_(FLAC__IOHandle handle, FLAC__IOCallback_Read read_cb, FLAC__StreamMetadata_VorbisComment_Entry *entry, unsigned max_length);
+static FLAC__Metadata_SimpleIteratorStatus read_metadata_block_data_vorbis_comment_cb_(FLAC__IOHandle handle, FLAC__IOCallback_Read read_cb, FLAC__IOCallback_Seek seek_cb, FLAC__StreamMetadata_VorbisComment *block, unsigned block_length);
static FLAC__Metadata_SimpleIteratorStatus read_metadata...
2017 Jan 03
1
Re: [PATCH] lib: Use a common function to validate strings.
...src/utils.c | 50 +++++++++++++++++++++++++++++--
> 6 files changed, 110 insertions(+), 74 deletions(-)
>
Look reasonable, just a couple of notes.
> +bool
> +guestfs_int_string_is_valid (const char *str,
> + size_t min_length, size_t max_length,
> + bool alpha, bool digit, const char *extra)
min_length and max_length could be signed (ssize_t), with -1 (and even
0) indicating no actual limit. IMHO that could be slightly more readable
than SIZE_MAX.
Also, all the usages so far pass alpha=true, so could be wo...
2014 Sep 26
2
Patch to improve malformed vorbiscomment handling
Janne Hyv?rinen wrote:
> Patch v2, now handles more malformed cases. Original patch was for a
> file for which I had a sample from a user but this allows handling some
> manually broken test cases.
Err, I'm getting warning messages on that patch:
CC metadata_iterators.lo
metadata_iterators.c: In function ?read_metadata_block_data_vorbis_comment_cb_?:
2014 Sep 26
0
Patch to improve malformed vorbiscomment handling
...__IOHandle handle, FLAC__IOCallback_Read read_cb, FLAC__StreamMetadata_VorbisComment *block);
+static FLAC__Metadata_SimpleIteratorStatus read_metadata_block_data_vorbis_comment_entry_cb_(FLAC__IOHandle handle, FLAC__IOCallback_Read read_cb, FLAC__StreamMetadata_VorbisComment_Entry *entry, unsigned max_length);
+static FLAC__Metadata_SimpleIteratorStatus read_metadata_block_data_vorbis_comment_cb_(FLAC__IOHandle handle, FLAC__IOCallback_Read read_cb, FLAC__IOCallback_Seek seek_cb, FLAC__StreamMetadata_VorbisComment *block, unsigned block_length);
static FLAC__Metadata_SimpleIteratorStatus read_metadata...
2016 Dec 24
2
[PATCH] lib: Use a common function to validate strings.
As discussed in the thread on validating $TERM, it would be good to
have a common function to do this. This is such a function.
The main advantage is it includes unit tests which the previous
functions did not.
Rich.
2016 Dec 24
0
[PATCH] lib: Use a common function to validate strings.
..._int_random_string (char *ret, size_t len);
extern char *guestfs_int_drive_name (size_t index, char *ret);
extern ssize_t guestfs_int_drive_index (const char *);
extern int guestfs_int_is_true (const char *str);
+extern bool guestfs_int_string_is_valid (const char *str, size_t min_length, size_t max_length, bool alpha, bool digit, const char *extra);
//extern void guestfs_int_fadvise_normal (int fd);
extern void guestfs_int_fadvise_sequential (int fd);
extern void guestfs_int_fadvise_random (int fd);
diff --git a/src/unit-tests.c b/src/unit-tests.c
index 06d4d27..e22a61e 100644
--- a/src/unit-test...
2014 Sep 25
2
Patch to improve malformed vorbiscomment handling
Here's a patch to allow flac and metaflac handle files with malformed
vorbiscomment metadata block.
-------------- next part --------------
diff --git a/src/libFLAC/metadata_iterators.c b/src/libFLAC/metadata_iterators.c
index d50df39..39cb276 100644
--- a/src/libFLAC/metadata_iterators.c
+++ b/src/libFLAC/metadata_iterators.c
@@ -78,7 +78,7 @@ static FLAC__Metadata_SimpleIteratorStatus
2007 Nov 02
0
5 commits - libswfdec/swfdec_as_array.c libswfdec/swfdec_as_array.h libswfdec/swfdec_as_date.c libswfdec/swfdec_as_date.h libswfdec/swfdec_as_initialize.as libswfdec/swfdec_as_interpret.c libswfdec/swfdec_as_object.c libswfdec/swfdec_filter.c
...+}
+
+static void
swfdec_text_paragraph_add_attribute (SwfdecParagraph *paragraph,
PangoAttribute *attr)
{
@@ -294,11 +312,13 @@ swfdec_text_field_movie_get_paragraphs (SwfdecTextFieldMovie *text, int *num)
GArray *paragraphs;
SwfdecParagraph paragraph;
const char *p, *end;
+ guint max_length;
g_assert (SWFDEC_IS_TEXT_FIELD_MOVIE (text));
paragraphs = g_array_new (TRUE, TRUE, sizeof (SwfdecParagraph));
+ max_length = 0;
p = text->input->str;
while (*p != '\0')
{
@@ -306,6 +326,9 @@ swfdec_text_field_movie_get_paragraphs (SwfdecTextFieldMovie *text, in...
2005 Jan 30
2
Rinternals.h and iostream don't play nice together'
...its/codecvt.h:115: error: ISO C++ forbids defining types
within return type
/usr/include/c++/3.3/bits/codecvt.h:115: error: extraneous `int' ignored
/usr/include/c++/3.3/bits/codecvt.h:115: error: non-member function `
std::__codecvt_abstract_base<_InternT, _ExternT, _StateT> std::max_length()'
cannot have `const' method qualifier
/usr/include/c++/3.3/bits/codecvt.h:115: error: semicolon missing after
declaration of `class std::__codecvt_abstract_base<_InternT, _ExternT,
_StateT>'
/usr/include/c++/3.3/bits/codecvt.h: In function `int std::max_length()'...
2007 Nov 04
0
7 commits - libswfdec/swfdec_text_field_movie.c libswfdec/swfdec_text_field_movie.h libswfdec/swfdec_text_field_movie_html.c
...swfdec_text_field_movie_get_paragraphs (SwfdecTextFieldMovie *text, int *num)
while (*p != '\0')
{
end = strpbrk (p, "\r\n");
- if (end == NULL)
+ if (end == NULL) {
end = strchr (p, '\0');
+ } else {
+ end++;
+ }
if (end - p > max_length)
max_length = end - p;
@@ -334,7 +337,6 @@ swfdec_text_field_movie_get_paragraphs (SwfdecTextFieldMovie *text, int *num)
paragraphs = g_array_append_val (paragraphs, paragraph);
p = end;
- if (*p != '\0') p++;
}
if (num != NULL)
@@ -511,7 +513,6 @@ swfdec_text_...
2009 Dec 11
1
Multiple choices inside the model
Hi,
I''m trying to define multiple choices inside the rails model.
In Django I would do something like this:
location = models.CharField(
max_length=3,
choices=LOCATION_CHOICES,
help_text="Which location do
you prefer?"
)
LOCATION_CHOICES = (
(''AMS'', '...
2007 Feb 09
1
speex in C# please help
...atic extern int speex_encoder_int(void *state , short *input , SpeexBits *bits);
//exported bit operation methods
[DllImport(libpath)]
public static extern void speex_bits_init(SpeexBits *bits);
[DllImport(libpath)]
public static extern int speex_bits_write(SpeexBits *bits , IntPtr bytes , int Max_length);
[DllImport(libpath)]
public static extern int speex_bits_reset(SpeexBits *bits);
[DllImport(libpath)]
public static extern void *speex_decoder_init(int modein);
[DllImport(libpath)]
public static extern int speex_decoder_ctl(void *state , int request , void *ptr);
[DllImport(libpath)]
pub...
2002 Oct 05
2
ogg123 remote interface
...diff -urN -X diff.ignore ogg123.orig/oggvorbis_format.c ogg123/oggvorbis_format.c
--- ogg123.orig/oggvorbis_format.c Sat Oct 5 16:22:17 2002
+++ ogg123/oggvorbis_format.c Sat Oct 5 16:27:16 2002
@@ -258,6 +258,56 @@
free(decoder);
}
+#if UGLY_ID3_HACK
+
+struct {
+ const char *key;
+ int max_length;
+} id3tags[] = {
+ {"TITLE=", 30},
+ {"ARTIST=", 30},
+ {"ALBUM=", 30},
+ {"YEAR=", 4},
+ {"COMMENT=", 30},
+ {"GENRE=", 20},
+ {NULL, 0}
+};
+
+char *id3string (decoder_t *decoder)
+{
+ ovf_private_t *priv = decoder->private;...
2016 Jul 01
1
silk_warped_autocorrelation_FIX() NEON optimization
Hi all,
I'm sending patch "Optimize silk_warped_autocorrelation_FIX() for ARM NEON" in an separate email.
It is based on Tim’s aarch64v8 branch https://git.xiph.org/?p=users/tterribe/opus.git;a=shortlog;h=refs/heads/aarch64v8
Thanks for your comments.
Linfeng
2007 Oct 17
0
6 commits - libswfdec/swfdec_as_strings.c libswfdec/swfdec_movie.c libswfdec/swfdec_movie.h libswfdec/swfdec_text_field.c libswfdec/swfdec_text_field.h libswfdec/swfdec_text_field_movie_as.c libswfdec/swfdec_text_field_movie.c
.../
;
diff --git a/libswfdec/swfdec_text_field.c b/libswfdec/swfdec_text_field.c
index a594bbd..064dcd0 100644
--- a/libswfdec/swfdec_text_field.c
+++ b/libswfdec/swfdec_text_field.c
@@ -83,7 +83,6 @@ static void
swfdec_text_field_init (SwfdecTextField * text)
{
text->scroll = 1;
- text->max_length = G_MAXUINT;
}
SwfdecLayout *
@@ -434,7 +433,9 @@ tag_func_define_edit_text (SwfdecSwfDecoder * s, guint tag)
text->color = SWFDEC_COLOR_COMBINE (255, 255, 255, 255);
}
if (has_max_length) {
- text->max_length = swfdec_bits_get_u16 (b);
+ text->max_chars = swfdec_bits_...
2007 Feb 13
1
Re: Speex-dev Digest, Vol 33, Issue 10
..., short *input , SpeexBits *bits);
>
> //exported bit operation methods
>
> [DllImport(libpath)]
>
> public static extern void speex_bits_init(SpeexBits *bits);
>
> [DllImport(libpath)]
>
> public static extern int speex_bits_write(SpeexBits *bits , IntPtr bytes , int Max_length);
>
> [DllImport(libpath)]
>
> public static extern int speex_bits_reset(SpeexBits *bits);
>
> [DllImport(libpath)]
>
> public static extern void *speex_decoder_init(int modein);
>
> [DllImport(libpath)]
>
> public static extern int speex_decoder_ctl(void *state...
2007 Mar 29
0
libswfdec-gtk/swfdec_playback_alsa.c libswfdec/swfdec_audio_event.h libswfdec/swfdec_audio_flv.h libswfdec/swfdec_audio_stream.h libswfdec/swfdec_bits.c libswfdec/swfdec_bits.h libswfdec/swfdec_buffer.c libswfdec/swfdec_buffer.h libswfdec/swfdec_cache.c
...index 37727eb..151feb2 100644
--- a/libswfdec/swfdec_edittext.c
+++ b/libswfdec/swfdec_edittext.c
@@ -97,7 +97,7 @@ int
tag_func_define_edit_text (SwfdecSwfDecoder * s)
{
SwfdecEditText *text;
- unsigned int id;
+ guint id;
int reserved, use_outlines;
gboolean has_font, has_color, has_max_length, has_layout, has_text;
SwfdecBits *b = &s->b;
@@ -154,7 +154,7 @@ tag_func_define_edit_text (SwfdecSwfDeco
text->max_length = swfdec_bits_get_u16 (b);
}
if (has_layout) {
- unsigned int align = swfdec_bits_get_u8 (b);
+ guint align = swfdec_bits_get_u8 (b);
switch...
2015 Oct 09
3
Python version for scripts in LLVM?
...==========================================
--- lint/common_lint.py (revision 249819)
+++ lint/common_lint.py (working copy)
@@ -2,6 +2,7 @@
#
# Common lint functions applicable to multiple types of files.
+from __future__ import print_function
import re
def VerifyLineLength(filename, lines, max_length):
@@ -89,7 +90,7 @@
for filename in filenames:
file = open(filename, 'r')
if not file:
- print 'Cound not open %s' % filename
+ print('Cound not open %s' % filename)
continue
lines = file.readlines()
lint.extend(linter.RunOnFile(filena...
2007 Dec 10
0
5 commits - libswfdec/jpeg libswfdec/swfdec_as_interpret.c libswfdec/swfdec_bits.c libswfdec/swfdec_cached.c libswfdec/swfdec_codec_adpcm.c libswfdec/swfdec_codec_audio.c libswfdec/swfdec_flash_security.c libswfdec/swfdec_image.c
...index 50b7a57..ab33f55 100644
--- a/libswfdec/swfdec_text_field_movie.c
+++ b/libswfdec/swfdec_text_field_movie.c
@@ -368,7 +368,7 @@ swfdec_text_field_movie_get_paragraphs (SwfdecTextFieldMovie *text, int *num)
if (text->text->password)
swfdec_text_field_movie_ensure_asterisks (text, max_length);
- return (SwfdecParagraph *)g_array_free (paragraphs, FALSE);
+ return (SwfdecParagraph *) (void *) g_array_free (paragraphs, FALSE);
}
static void
@@ -698,7 +698,7 @@ swfdec_text_field_movie_get_layouts (SwfdecTextFieldMovie *text, int *num,
if (num != NULL)
*num = layouts->le...
2007 Mar 29
0
Branch 'as' - 9 commits - libswfdec-gtk/swfdec_playback_alsa.c libswfdec/js libswfdec/Makefile.am libswfdec/swfdec_as_context.c libswfdec/swfdec_as_context.h libswfdec/swfdec_as_frame.c libswfdec/swfdec_as_frame.h libswfdec/swfdec_as_function.c
...index 37727eb..151feb2 100644
--- a/libswfdec/swfdec_edittext.c
+++ b/libswfdec/swfdec_edittext.c
@@ -97,7 +97,7 @@ int
tag_func_define_edit_text (SwfdecSwfDecoder * s)
{
SwfdecEditText *text;
- unsigned int id;
+ guint id;
int reserved, use_outlines;
gboolean has_font, has_color, has_max_length, has_layout, has_text;
SwfdecBits *b = &s->b;
@@ -154,7 +154,7 @@ tag_func_define_edit_text (SwfdecSwfDeco
text->max_length = swfdec_bits_get_u16 (b);
}
if (has_layout) {
- unsigned int align = swfdec_bits_get_u8 (b);
+ guint align = swfdec_bits_get_u8 (b);
switch...