Summary:ASTERISK-02874: [patch] var_val in res_config_odbc.c
Reporter:ivoice (ivoice)Labels:
Date Opened:2004-11-23 13:01:23.000-0600Date Closed:2008-01-15 15:14:50.000-0600
Versions:Frequency of
Environment:Attachments:( 0) patch_res_config_odbc.c.txt
Description:In res/res_config_odbc.c in function config_odbc var_val is a buffer of 128 char but I think that in asterisk max len of value in config is 512.

Is possible to change var_val[128] in var_val[512] ?
Comments:By: Brian West (bkw918) 2004-11-23 15:18:36.000-0600

Can you upload your patch :P  Also this isn't what I would call Major... please double check the bug posting guide.

edited on: 11-23-04 15:20

By: ivoice (ivoice) 2004-11-23 17:02:25.000-0600

From the "bug posting guide":

MAJOR: ____A bug which completely prevents Asterisk from operating in a method that it normally is expected to operate_____
and particularly if ___it cannot be reasonably worked around___ -- is MAJOR.

This is a Major bug:

1) completely prevents Asterisk from operating in a method that it normally is expected to operate (cut out long variables values)
2) it cannot be reasonably worked around

Asterisk config variables value in .conf files is at "least 512 bytes", not 128; so you cannot do porting from .conf to ODBC and it cannot be reasonably worked around.

The patch is attached.
This code is disclaimed by ivoice (Aldo Armiento) with fax in favour to Digium.

By: Brian West (bkw918) 2004-11-23 19:33:08.000-0600

Yes it can be reasonably worked around you found the problem and provided a fix.  Thus its not a Major bug!  Thats why I think it shouldn't have been posted as major.  


By: Mark Spencer (markster) 2004-11-23 22:20:05.000-0600

Fixed in CVS.

By: Russell Bryant (russell) 2004-11-25 13:14:23.000-0600

fixed in 1.0 with minor mods (set all variables on that line ="")

By: Digium Subversion (svnbot) 2008-01-15 15:14:50.000-0600

Repository: asterisk
Revision: 4327

U   trunk/res/res_config_odbc.c

r4327 | markster | 2008-01-15 15:14:50 -0600 (Tue, 15 Jan 2008) | 2 lines

Increase max buffer size (bug ASTERISK-2874)