This file is indexed.

/usr/include/assa-3.5/assa/MemDump.h is in libassa-3.5-5-dev 3.5.1-6.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
// -*- c++ -*-
//------------------------------------------------------------------------------
//                                 MemDump.h
//------------------------------------------------------------------------------
//  Copyright (c) 1995 by Vladislav Grinchenko
//
//  This library is free software; you can redistribute it and/or
//  modify it under the terms of the GNU Library General Public
//  License as published by the Free Software Foundation; either
//  version 2 of the License, or (at your option) any later version.
//
//  Permission to use, copy, modify, and distribute this software      
//  and its documentation for any purpose and without fee is hereby     
//  granted, provided that the above copyright notice appear in all     
//  copies.  The author makes no representations about the suitability  
//  of this software for any purpose.  It is provided "as is" without   
//  express or implied warranty.
//------------------------------------------------------------------------------
// Creation Date: November 25, 1995
//------------------------------------------------------------------------------
#ifndef MEM_DUMP_H
#define MEM_DUMP_H

#include <stdio.h>
#include <string.h>

namespace ASSA {

/** @file MemDump.h

	A Hex/Ascii memory dump of similar to od(1) UNIX utility.

	A class that converts raw binary memory image into hex-ascii
	representation, much like od(1) does.

	MemDump transforms binary chunk of memory into corresponding
	hex and ascii formats.
*/

class MemDump 
{
private:
	/// pointer to converted image
	char* m_dump;

	/// static Null string
	static const char m_empty_str[];
	
public:
	/** Constructor converts original binary image to hex and ascii 
	    representation, and stores resultant image in internal buffer for
	    later retrieval. MemDump owns the image and will free the memory
	    once it is out of scope
	    
	    @param msg_  char pointer to original binary image.
	    @param len_  lenght of the binary image.
	*/
	MemDump (const char* msg_, int len_);

	/// Destructor releases image memory. 
	~MemDump();

	/** Obtain a pointer to the dump image (null-terminated char string).
	    @return pointer to converted memory area
	*/
	const char* getMemDump() const;

	/** Write hex/ascii dump of a memory region to log file.
	 *
	 * @param mask_ Debug mask as defined in debug.h
	 * @param info_ Information string to annotate the hex memory dump
	 * @param msg_  Pointer to the memory area
	 * @param len_  Number of bytes
	 */
	static void dump_to_log (unsigned long mask_, 
							 const char* info_, 
							 const char* msg_, 
							 int len_);
};


inline 
MemDump::
~MemDump()
{
	if (m_dump && m_dump != m_empty_str) {
		delete [] m_dump;
	}
	m_dump = NULL;
}

inline const char*
MemDump::
getMemDump () const
{
	return (m_dump ? (const char*) m_dump : m_empty_str);
}

} // end namespace ASSA
	
#endif /* MEM_DUMP_H */