Skip to content

GitLab

  • Menu
Projects Groups Snippets
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • L libotr
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 50
    • Issues 50
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 0
    • Merge requests 0
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Libraries
  • libotr
  • Issues
  • #76

Closed
Open
Created Apr 01, 2016 by David Goulet@dgouletOwner

Possible parsing issue in message.c

In message.c, it seems to assume that the first '?OTR|' occurence is at the same offset as the first '?OTR' occurence. Doesn't seem to raise any security issue though.

Proposed patch:

--- ../libotr-4.1.0/src/message.c	2015-01-17 21:10:15.244660449 +0100
+++ message.c	2015-01-18 18:47:09.342512374 +0100
@@ -987,7 +987,7 @@
     otrtag = strstr(message, "?OTR");
     if (otrtag) {
 	/* See if we have a V3 fragment */
-	if (strstr(message, "?OTR|")) {
+	if (otrtag == strstr(message, "?OTR|")) {
 	    /* Get the instance tag from fragment header*/
 	    sscanf(otrtag, "?OTR|%x|%x,", &their_instance, &our_instance);
 	    /* Ignore message if it is intended for a different instance */

(from redmine: created on 2015-01-26, closed on 2015-02-08)

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking