Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
A
asterisk
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Issue analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Voice
asterisk
Commits
f83a3344
Commit
f83a3344
authored
8 years ago
by
zuul
Committed by
Gerrit Code Review
8 years ago
Browse files
Options
Downloads
Plain Diff
Merge "pjsip: prevent memory corruption on creation of xml bodies"
parents
9f64980e
65ad554c
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
third-party/pjproject/patches/0025-fix-print-xml-crash.patch
+24
-0
24 additions, 0 deletions
third-party/pjproject/patches/0025-fix-print-xml-crash.patch
with
24 additions
and
0 deletions
third-party/pjproject/patches/0025-fix-print-xml-crash.patch
0 → 100644
+
24
−
0
View file @
f83a3344
From 1bc5ca699f523bd8e910203a3eb4dee58f366976 Mon Sep 17 00:00:00 2001
From: Joshua Elson <joshelson@gmail.com>
Date: Mon, 20 Mar 2017 19:28:47 -0600
Subject: [PATCH] Prevent memory corruption on xml tag write
---
pjlib-util/src/pjlib-util/xml.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/pjlib-util/src/pjlib-util/xml.c b/pjlib-util/src/pjlib-util/xml.c
index 296b232..b0aad26 100644
--- a/pjlib-util/src/pjlib-util/xml.c
+++ b/pjlib-util/src/pjlib-util/xml.c
@@ -248,6 +248,7 @@
static int xml_print_node( const pj_xml_node *node, int indent,
if (node->content.slen==0 &&
node->node_head.next==(pj_xml_node*)&node->node_head)
{
+ if (SIZE_LEFT() < 3) return -1;
*p++ = ' ';
*p++ = '/';
*p++ = '>';
--
2.10.1 (Apple Git-78)
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment