You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@avro.apache.org by "Lucas Martin-King (Created) (JIRA)" <ji...@apache.org> on 2011/11/25 05:12:39 UTC
[jira] [Created] (AVRO-960) String Const Correctness in Avro-C
String Const Correctness in Avro-C
----------------------------------
Key: AVRO-960
URL: https://issues.apache.org/jira/browse/AVRO-960
Project: Avro
Issue Type: Improvement
Components: c
Affects Versions: 1.6.1
Reporter: Lucas Martin-King
Priority: Minor
I notice that avro_value_set_string() takes in a char *, not a const char *, and some of the the lower level functions it uses do take a const char *.
I would presume that the library does not modify user input string data.
Can we fix this by maintaining const char * all the way up to the user API?
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (AVRO-960) String Const Correctness in Avro-C
Posted by "Michael Cooper (Commented) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/AVRO-960?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13157651#comment-13157651 ]
Michael Cooper commented on AVRO-960:
-------------------------------------
Lucas, It appears your patch file is the wrong way around?
> String Const Correctness in Avro-C
> ----------------------------------
>
> Key: AVRO-960
> URL: https://issues.apache.org/jira/browse/AVRO-960
> Project: Avro
> Issue Type: Improvement
> Components: c
> Affects Versions: 1.6.1
> Reporter: Lucas Martin-King
> Priority: Minor
> Labels: c, const
> Attachments: avro_const_string.patch
>
>
> I notice that avro_value_set_string() takes in a char *, not a const char *, and some of the the lower level functions it uses do take a const char *.
> I would presume that the library does not modify user input string data.
> Can we fix this by maintaining const char * all the way up to the user API?
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (AVRO-960) String Const Correctness in Avro-C
Posted by "Lucas Martin-King (Updated) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/AVRO-960?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Lucas Martin-King updated AVRO-960:
-----------------------------------
Status: Patch Available (was: Open)
(Patch now attached.)
> String Const Correctness in Avro-C
> ----------------------------------
>
> Key: AVRO-960
> URL: https://issues.apache.org/jira/browse/AVRO-960
> Project: Avro
> Issue Type: Improvement
> Components: c
> Affects Versions: 1.6.1
> Reporter: Lucas Martin-King
> Priority: Minor
> Labels: c, const
> Attachments: avro_const_string.patch
>
>
> I notice that avro_value_set_string() takes in a char *, not a const char *, and some of the the lower level functions it uses do take a const char *.
> I would presume that the library does not modify user input string data.
> Can we fix this by maintaining const char * all the way up to the user API?
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (AVRO-960) String Const Correctness in Avro-C
Posted by "Douglas Creager (Updated) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/AVRO-960?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Douglas Creager updated AVRO-960:
---------------------------------
Resolution: Fixed
Fix Version/s: 1.6.2
Assignee: Douglas Creager
Status: Resolved (was: Patch Available)
Looks good. And this change is backwards compatible, since everything that compiled before still compiles now. Committed to SVN trunk.
> String Const Correctness in Avro-C
> ----------------------------------
>
> Key: AVRO-960
> URL: https://issues.apache.org/jira/browse/AVRO-960
> Project: Avro
> Issue Type: Improvement
> Components: c
> Affects Versions: 1.6.1
> Reporter: Lucas Martin-King
> Assignee: Douglas Creager
> Priority: Minor
> Labels: c, const
> Fix For: 1.6.2
>
> Attachments: avro_const_string.patch
>
>
> I notice that avro_value_set_string() takes in a char *, not a const char *, and some of the the lower level functions it uses do take a const char *.
> I would presume that the library does not modify user input string data.
> Can we fix this by maintaining const char * all the way up to the user API?
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (AVRO-960) String Const Correctness in Avro-C
Posted by "Lucas Martin-King (Updated) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/AVRO-960?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Lucas Martin-King updated AVRO-960:
-----------------------------------
Status: Patch Available (was: Open)
> String Const Correctness in Avro-C
> ----------------------------------
>
> Key: AVRO-960
> URL: https://issues.apache.org/jira/browse/AVRO-960
> Project: Avro
> Issue Type: Improvement
> Components: c
> Affects Versions: 1.6.1
> Reporter: Lucas Martin-King
> Priority: Minor
> Labels: c, const
>
> I notice that avro_value_set_string() takes in a char *, not a const char *, and some of the the lower level functions it uses do take a const char *.
> I would presume that the library does not modify user input string data.
> Can we fix this by maintaining const char * all the way up to the user API?
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (AVRO-960) String Const Correctness in Avro-C
Posted by "Lucas Martin-King (Updated) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/AVRO-960?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Lucas Martin-King updated AVRO-960:
-----------------------------------
Status: Open (was: Patch Available)
> String Const Correctness in Avro-C
> ----------------------------------
>
> Key: AVRO-960
> URL: https://issues.apache.org/jira/browse/AVRO-960
> Project: Avro
> Issue Type: Improvement
> Components: c
> Affects Versions: 1.6.1
> Reporter: Lucas Martin-King
> Priority: Minor
> Labels: c, const
>
> I notice that avro_value_set_string() takes in a char *, not a const char *, and some of the the lower level functions it uses do take a const char *.
> I would presume that the library does not modify user input string data.
> Can we fix this by maintaining const char * all the way up to the user API?
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (AVRO-960) String Const Correctness in Avro-C
Posted by "Lucas Martin-King (Updated) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/AVRO-960?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Lucas Martin-King updated AVRO-960:
-----------------------------------
Attachment: (was: avro_const_string.patch)
> String Const Correctness in Avro-C
> ----------------------------------
>
> Key: AVRO-960
> URL: https://issues.apache.org/jira/browse/AVRO-960
> Project: Avro
> Issue Type: Improvement
> Components: c
> Affects Versions: 1.6.1
> Reporter: Lucas Martin-King
> Priority: Minor
> Labels: c, const
> Attachments: avro_const_string.patch
>
>
> I notice that avro_value_set_string() takes in a char *, not a const char *, and some of the the lower level functions it uses do take a const char *.
> I would presume that the library does not modify user input string data.
> Can we fix this by maintaining const char * all the way up to the user API?
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (AVRO-960) String Const Correctness in Avro-C
Posted by "Lucas Martin-King (Updated) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/AVRO-960?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Lucas Martin-King updated AVRO-960:
-----------------------------------
Attachment: (was: avro_const_string.patch)
> String Const Correctness in Avro-C
> ----------------------------------
>
> Key: AVRO-960
> URL: https://issues.apache.org/jira/browse/AVRO-960
> Project: Avro
> Issue Type: Improvement
> Components: c
> Affects Versions: 1.6.1
> Reporter: Lucas Martin-King
> Priority: Minor
> Labels: c, const
> Attachments: avro_const_string.patch
>
>
> I notice that avro_value_set_string() takes in a char *, not a const char *, and some of the the lower level functions it uses do take a const char *.
> I would presume that the library does not modify user input string data.
> Can we fix this by maintaining const char * all the way up to the user API?
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (AVRO-960) String Const Correctness in Avro-C
Posted by "Lucas Martin-King (Updated) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/AVRO-960?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Lucas Martin-King updated AVRO-960:
-----------------------------------
Attachment: avro_const_string.patch
Patch which fixes the issue.
I hereby disclaim all rights to this patch, release this patch into the PUBLIC DOMAIN.
> String Const Correctness in Avro-C
> ----------------------------------
>
> Key: AVRO-960
> URL: https://issues.apache.org/jira/browse/AVRO-960
> Project: Avro
> Issue Type: Improvement
> Components: c
> Affects Versions: 1.6.1
> Reporter: Lucas Martin-King
> Priority: Minor
> Labels: c, const
> Attachments: avro_const_string.patch
>
>
> I notice that avro_value_set_string() takes in a char *, not a const char *, and some of the the lower level functions it uses do take a const char *.
> I would presume that the library does not modify user input string data.
> Can we fix this by maintaining const char * all the way up to the user API?
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (AVRO-960) String Const Correctness in Avro-C
Posted by "Lucas Martin-King (Updated) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/AVRO-960?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Lucas Martin-King updated AVRO-960:
-----------------------------------
Attachment: avro_const_string.patch
Updated patch.
> String Const Correctness in Avro-C
> ----------------------------------
>
> Key: AVRO-960
> URL: https://issues.apache.org/jira/browse/AVRO-960
> Project: Avro
> Issue Type: Improvement
> Components: c
> Affects Versions: 1.6.1
> Reporter: Lucas Martin-King
> Priority: Minor
> Labels: c, const
> Attachments: avro_const_string.patch
>
>
> I notice that avro_value_set_string() takes in a char *, not a const char *, and some of the the lower level functions it uses do take a const char *.
> I would presume that the library does not modify user input string data.
> Can we fix this by maintaining const char * all the way up to the user API?
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (AVRO-960) String Const Correctness in Avro-C
Posted by "Lucas Martin-King (Updated) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/AVRO-960?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Lucas Martin-King updated AVRO-960:
-----------------------------------
Attachment: avro_const_string.patch
Fixed patch (was a reverse patch before)
> String Const Correctness in Avro-C
> ----------------------------------
>
> Key: AVRO-960
> URL: https://issues.apache.org/jira/browse/AVRO-960
> Project: Avro
> Issue Type: Improvement
> Components: c
> Affects Versions: 1.6.1
> Reporter: Lucas Martin-King
> Priority: Minor
> Labels: c, const
> Attachments: avro_const_string.patch, avro_const_string.patch
>
>
> I notice that avro_value_set_string() takes in a char *, not a const char *, and some of the the lower level functions it uses do take a const char *.
> I would presume that the library does not modify user input string data.
> Can we fix this by maintaining const char * all the way up to the user API?
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira