[
https://issues.apache.org/jira/browse/TS-4366?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15295579#comment-15295579
]
ASF GitHub Bot commented on TS-4366:
------------------------------------
GitHub user gtenev opened a pull request:
https://github.com/apache/trafficserver/pull/656
TS-4366 Uninitialized stack value used in mp4 plugin
It is possible that there are cases where IOBufferReaderCopy() does not
modify
the input buffer (copy 0 bytes) which leaves the buffer uninitialized which
is
undesirable since the buffers are always allocated on the stack.
Addressed it in one of 2 ways:
(1) memset(buffer, 0, sizeof(buffer)) or
(2) check IOBufferReaderCopy() return value and handle accordingly.
These changes are meant to only address using uninitialized values
allocated on
the stack, avoiding bigger changes since regression tests are not available
to
properly verify functionality.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/gtenev/trafficserver TS-4366
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/trafficserver/pull/656.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #656
----
commit 9c2e929619b13497f816fcb6b32cb63dc28d1319
Author: Gancho Tenev <[email protected]>
Date: 2016-04-26T19:30:24Z
TS-4366 Uninitialized stack value used in mp4 plugin
It is possible that there are cases where IOBufferReaderCopy() does not
modify
the input buffer (copy 0 bytes) which leaves the buffer uninitialized which
is
undesirable since the buffers are always allocated on the stack.
Addressed it in one of 2 ways:
(1) memset(buffer, 0, sizeof(buffer)) or
(2) check IOBufferReaderCopy() return value and handle accordingly.
These changes are meant to only address using uninitialized values
allocated on
the stack, avoiding bigger changes since regression tests are not available
to
properly verify functionality.
----
> [clang-analyzer] Uninitialized stack value used in mp4 plugin
> -------------------------------------------------------------
>
> Key: TS-4366
> URL: https://issues.apache.org/jira/browse/TS-4366
> Project: Traffic Server
> Issue Type: Bug
> Components: Plugins
> Reporter: Gancho Tenev
> Assignee: Gancho Tenev
> Fix For: 7.0.0
>
>
> Logic error: Result of operation is garbage or undefined
> Source: plugins/experimental/mp4/mp4_meta.cc: 951
> Function: Mp4Meta::mp4_read_co64_atom():
> Within the expansion of the macro 'mp4_get_32value':
> The left operand of '<<' is a garbage value
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)