You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@avro.apache.org by "Tom White (JIRA)" <ji...@apache.org> on 2016/09/27 15:07:20 UTC
[jira] [Resolved] (AVRO-1853) Compiler::toBin(const std::string& s)
crashes on empty string
[ https://issues.apache.org/jira/browse/AVRO-1853?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Tom White resolved AVRO-1853.
-----------------------------
Resolution: Fixed
Hadoop Flags: Reviewed
Fix Version/s: 1.9.0
I committed this. Thanks Zoltan.
> Compiler::toBin(const std::string& s) crashes on empty string
> -------------------------------------------------------------
>
> Key: AVRO-1853
> URL: https://issues.apache.org/jira/browse/AVRO-1853
> Project: Avro
> Issue Type: Bug
> Components: c++
> Affects Versions: 1.8.1
> Environment: Win64 debug
> Reporter: Hans Thulin
> Assignee: Zoltan Ivanfi
> Priority: Critical
> Fix For: 1.9.0
>
> Original Estimate: 1h
> Remaining Estimate: 1h
>
> Compiler::toBin(const std::string& s) crashes if s is empty. A simple sanity check should fix it:
> static vector<uint8_t> toBin(const std::string& s)
> {
> vector<uint8_t> result;
> if(!s.empty())
> {
> result.resize(s.size());
> std::copy(s.c_str(), s.c_str() + s.size(), &result[0]);
> }
> return result;
> }
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)