~ubuntu-branches/ubuntu/maverick/clamav/maverick-security

« back to all changes in this revision

Viewing changes to libclamav/c++/llvm/lib/CodeGen/PBQP/Solution.h

  • Committer: Bazaar Package Importer
  • Author(s): Marc Deslauriers
  • Date: 2011-02-23 14:27:51 UTC
  • mfrom: (0.35.17 sid)
  • Revision ID: james.westby@ubuntu.com-20110223142751-o9xb8jyvhkh75d0n
Tags: 0.96.5+dfsg-1ubuntu1.10.10.2
* SECURITY UPDATE: denial of service via double free in vba processing
  - libclamav/vba_extract.c: set buf to NULL when it gets freed.
  - http://git.clamav.net/gitweb?p=clamav-devel.git;a=commit;h=d21fb8d975f8c9688894a8cef4d50d977022e09f
  - CVE-2011-1003

Show diffs side-by-side

added added

removed removed

Lines of Context:
26
26
  /// To get the selection for each node in the problem use the getSelection method.
27
27
  class Solution {
28
28
  private:
 
29
 
29
30
    typedef std::map<Graph::NodeItr, unsigned, NodeItrComparator> SelectionsMap;
30
31
    SelectionsMap selections;
31
32
 
 
33
    unsigned r0Reductions, r1Reductions, r2Reductions, rNReductions;
 
34
 
32
35
  public:
33
36
 
34
37
    /// \brief Number of nodes for which selections have been made.
35
38
    /// @return Number of nodes for which selections have been made.
36
39
    unsigned numNodes() const { return selections.size(); }
37
40
 
 
41
    /// \brief Records a reduction via the R0 rule. Should be called from the
 
42
    ///        solver only.
 
43
    void recordR0() { ++r0Reductions; }
 
44
 
 
45
    /// \brief Returns the number of R0 reductions applied to solve the problem.
 
46
    unsigned numR0Reductions() const { return r0Reductions; }
 
47
 
 
48
    /// \brief Records a reduction via the R1 rule. Should be called from the
 
49
    ///        solver only.
 
50
    void recordR1() { ++r1Reductions; }
 
51
 
 
52
    /// \brief Returns the number of R1 reductions applied to solve the problem.
 
53
    unsigned numR1Reductions() const { return r1Reductions; }
 
54
 
 
55
    /// \brief Records a reduction via the R2 rule. Should be called from the
 
56
    ///        solver only.
 
57
    void recordR2() { ++r2Reductions; }
 
58
 
 
59
    /// \brief Returns the number of R2 reductions applied to solve the problem.
 
60
    unsigned numR2Reductions() const { return r2Reductions; }
 
61
 
 
62
    /// \brief Records a reduction via the RN rule. Should be called from the
 
63
    ///        solver only.
 
64
    void recordRN() { ++ rNReductions; }
 
65
 
 
66
    /// \brief Returns the number of RN reductions applied to solve the problem.
 
67
    unsigned numRNReductions() const { return rNReductions; }
 
68
 
38
69
    /// \brief Set the selection for a given node.
39
70
    /// @param nItr Node iterator.
40
71
    /// @param selection Selection for nItr.